4 ms·
There is no ambiguity. The Date constructor provides a timezone offset: myDate.getTimezonOffset(); It outputs the number of minutes different from UTC ti
by austin-cheney 1y ago
There is no ambiguity. The Date constructor provides a timezone offset:
myDate.getTimezonOffset();
It outputs the number of minutes different from UTC time. I use this to display server time in both server local and zulu (UTC) via a WebSocket broadcast every 950ms.
- AdieuToLogic 1y ago>> I think a better "lesson learned" in this case is to remove all ambiguity from datetime types ... > There is no ambiguity. The ambiguity I referenced was regarding program logic, not how `Date` operates when given only the year/month/date part of an instant. Perhaps I should have said instead: I think a better "lesson learned" in this case is to remove all ambiguity when using datetime types by internally using only UTC representations for calculations ... And, yes, I do see the irony in this. :-)