How to set the timezone on the Pico #1327
Replies: 12 comments
-
Posted at 2015-05-05 by @gfwilliams I'm afraid it's not quite as easy as changing the zimezone at the moment (I've just filed a bug for it). You can however just change the way the date is created, to create a date that's a few hours in the future or past:
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-22 by cwilt Digging up an old post. Was this fixed? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-22 by @gfwilliams No, I'm afraid not. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-22 by cwilt Ok. No problem. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-12 by user58511 what is the bug # and where can we vote for it? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-12 by DrAzzy I have a computer set to the wrong time zone ( with auto set time turned off, so it reports that. It's the local time in gmt instead of the local time zone) that I use to set the time on my Espruinii... |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-12 by user58511 My computer's timezone is set correctly, but the Pico seems to be set to GMT no matter what. Here is the code I am using to find out my local sunrise & sunset -- it relies on a variable containing my timezone offset, which I must keep up-to-date based on DST here... The trick for me is to just do everything as GMT and then only change for the display
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-03-14 by @gfwilliams The issue for it is here: espruino/Espruino#530 It's slightly irritating, but isn't too hard to work around |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-02-07 by asez73 Hi @gfwilliams,
So, if I use a negative minute, the hour will be correctly handled while using an over 60 minutes minute parameter will not increment the hour.... This all about gps providing UTC time while I have to handle local day time and winter / summer changes. Beeing in continental Europe, I have an approximative approach (not world wide) which gave me the following functions to get summer / winter day light savings:
So references above are in french... Which is fine for me :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-02-07 by @gfwilliams It's not entirely surprising that the minute parameter doesn't respond well to out of range minutes. I'm extremely surprised it works on desktop! However I've just tweaked To do stuff like alter the hour what I'd suggest is to:
Either that or you could keep changing I'm actually kind of surprised there's nothing standard in the |
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-02-07 by asez73 Yes, I agree that your solution .getTime() seems to be the sole safe solution... There is no such thing as an uncoherent choice: But that's javascript standards... :)
I had dreamed, apparently, to just add the new Date().getTimezone() minutes to the minute parameter of new Date(..., minute, ...) rather than convert everything to ms since 1970, just for simple straight readability. To explain a bit more what makes me wondering so much: I get the gps time as 6 bytes in UTC time from ublox M8 binary protocol UBX-NAV-PVT or UBX-NVA-TIMEUTC for instance.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2019-06-20 by PaulH Maybe this could help others searching for DST stuff (for Europe at least):
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2015-05-02 by Vnge
Currently the timezone is set to GMT 0, I want to set it to US Central Time. any ideas on how to do so? I am working with the Pico clock example.
Beta Was this translation helpful? Give feedback.
All reactions