JavaScript Date Time Zone Differences
Differences in assumed time zone Given a date string of "March 7, 2014", parse() assumes a local time zone, but given an ISO format such as "2014-03-07" it will assume a time zone of UTC (ES5 and ECMAScript 2015). Therefore Date objects produced using those strings may represent different moments in time depending on the version of ECMAScript supported unless the system is set with a local time zone of UTC. This means that two date strings that appear equivalent may result in two different values depending on the format of the string that is being converted.
A screenshot explains that JavaScript parses seemingly equivalent date strings using different assumed time zones. The joke is the frustrating inconsistency of JavaScript Date parsing, a common topic of programmer complaints and reaction memes. EN: A screenshot explains that JavaScript parses seemingly equivalent date strings using different assumed time zones. The joke is the frustrating inconsistency of JavaScript Date parsing, a common topic of programmer complaints and reaction memes.
- @ithueti / 642 2019-02-25
- Type
- image
- Size
- 800×261 · 50.5 KiB
- Mood
- саркастичный, раздражённый
- Language
- en
- Added