Time on Puck.js correct but not date #2226
Replies: 5 comments
-
Posted at 2017-06-09 by @gfwilliams Odd - what happens if you do |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-09 by ConorONeill Hmm, it's right: "Fri Jun 9 2017 10:36:48 GMT+0000" |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-09 by @gfwilliams Strange. Maybe it's the way you do Also, the values returned for |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-09 by ConorONeill Good to know re month, thanks. Ahhhhhhhhhhhh, getDay() is Day of Week! User error completely :-) Ignore me ;-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-09 by @gfwilliams No problem - glad it's sorted ;) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-09 by ConorONeill
I've having a weird issue on Puck with datetime.
I have "Send time to Espruino" set in the IDE.
If I do new Date(Date.now()).getHours() or new Date(Date.now()).getMinutes(), I get the right thing.
But new Date(Date.now()).getMonth() is returning 5 and new Date(Date.now()).getDay() is also returning 5. (That's for today). Yesterday it was 4 for getDay().
This is on 1v92 using standalone Windows IDE espruino_ide_win64_0v65.9
Any idea where this offset could be coming from?
Beta Was this translation helpful? Give feedback.
All reactions