Time settings in console.log ? #5169
Replies: 1 comment
-
Posted at 2015-08-21 by @gfwilliams Well, you can set time with the Web IDE - in fact that tutorial says:
But also simply using the The main thing you need to get the time is Then you can initialise the Date class if you need to get more specific information about the time. Posted at 2015-08-21 by bigplik I knew about description from the tutorial, but till I get my espruino board I test IDE on my maple leaflabs. I know Web IDE set time itself when this option is marked but it set me wrong zone time, Posted at 2015-08-21 by @gfwilliams Afraid you can't set a timezone at the moment - you'd just have to subtract or add that many seconds to the 'real' time. Posted at 2015-08-21 by bigplik ok, thanks Gordon Posted at 2015-08-21 by DrAzzy Ya... LAN-side C&C server that I use to send times to embedded devices has had the time zone and time set weirdly so when Espruino parses it's date, it gets the right time. Kind of annoying, because I have to turn off time sync, so the time drifts. It's now far enough behind reality that it's annoying me, and I'll need to nudge the time a bit this weekend. Posted at 2015-08-22 by @allObjects ...'nudge' THE time... I like that! ;-) ...if this would be possible, I would put it more behind to enjoy the moments 'longer'... Posted at 2015-11-29 by CanyonCasa How about a user option to set/detect time zone in the IDE and adjust the setTime setup accordingly to reflect local time instead of UTC? Posted at 2015-11-30 by @gfwilliams Yes, that sounds like a good idea. I guess you'd still have problems with 'daylight saving time' but it'd be a great help for the majority of things. I added an 'issue' for it here: espruino/EspruinoTools#17 Posted at 2015-11-30 by @allObjects Using the IDE's time zone (to set time to local instead of UTC) creates different behavior of being connected from disconnected from IDE.... except it is part of the saving... Posted at 2015-11-30 by Sacha If your espruino is connected to another device that knows the time,timezone and daylight saving, it could be easy (over Wifi or Xbee in my situation). In my setup i transfer seconds after EPOC (1970) minus/plus the differece to UTC to the espruino. I set the time with setTime on the espruino side then ignore the timezome at all. The time it self is correct ignoring the timezone (UTC) on the espruino at all. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-08-21 by bigplik
hi are there any portion of information or code about espruino time settings what would be visible in console? I mean like you can see date, time, seconds etc.? was trying to use commands from http://www.espruino.com/Reference reference section but unsuccessful
I could see from this eg. http://www.espruino.com/Pico+Clock#line=3,11 date (Thu Jan 1 1970 00:09:57 GMT+0000),
but couldn't set new date and time
Beta Was this translation helpful? Give feedback.
All reactions