D
D
Dmitry2017-09-19 07:12:18
JavaScript
Dmitry, 2017-09-19 07:12:18

How to add 7 hours to the current time?

The script itself is located https://codepen.io/rikschennink/pen/lyuaf?q=clock&...
I need the time to be shown as in Vladivostok.
And the script itself reads the current time from the computer, as I understand it.
Vladivostok - plus 7 hours to the current one.
When I add + 7 to value here, it writes 777 and not 14 in any way ...
How can I fix the current script, please tell me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
syma52, 2017-09-19
@sonics

If you stupidly hardcode the offset, then add 7 to the hours when you extract them from time.
time.getHours()+7

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question