Issue metadata
Sign in to add a comment
|
Chrome 67. Date errors on dates before Dec 1 1847 in Europe/London
Reported by
jason.sa...@redskyit.com,
Jun 8 2018
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36 Steps to reproduce the problem: Set machine to GMT timezone. In javascript console enter: > new Date(1847,11,1,0,1,15) > Wed Dec 01 1847 00:01:15 GMT+0000 (Greenwich Mean Time) which correctly returns 01:15. Now enter: > new Date(1847,11,1,0,1,14) > Wed Dec 01 1847 00:02:29 GMT+0000 (Greenwich Mean Time) which returns 02:29, rather than the expected 01:14. Gaining 75 seconds. This error then seems to exist for all dates less than 1847-12-14 00:01:15. e.g. > new Date(1800,0,1,0,0,0).getTime() > -5364662325000 but this should be -5364662400000. This only appears to have started happening since chrome 67. What is the expected behavior? The correct minutes seconds on dates less than 1847-12-14 00:01:15. What went wrong? All dates less than 1847-12-14 00:01:15 have 75 second error, at least for GMT timezone. Did this work before? Yes 66 Chrome version: 67.0.3396.79 Channel: stable OS Version: 10.0 Flash Version: Shockwave Flash 30.0 r0
,
Jun 8 2018
,
Jun 11 2018
,
Jun 11 2018
Able to reproduce the issue on reported version 67.0.3396.79 and latest chrome 69.0.3453.0 using Mac 10.12.6, Ubuntu 14.04 and Windows-10, hence providing Bisect Info Bisect Info: ================ Good build: 67.0.3389.0 Bad build: 67.0.3390.0 You are probably looking for a change made after 548395 (known good), but no later than 548396 (first known bad). https://chromium.googlesource.com/chromium/src/+log/f42b19bde0ce6e2d52fadc34a19b005dc236c2b8..7bed949c66408be72fa74397b34ddb0835b12df9 Suspecting: https://chromium.googlesource.com/v8/v8/+/1d3a87bd1cf456c005a4e5dbdb6f65e6b738ea91 from above changelog Reviewed-on: https://chromium-review.googlesource.com/572148 @Jungshik Shin: Please confirm the issue and help in re-assigning if it is not related to your change. Adding ReleaseBlock-Stable as it is seems a recent break, feel free to remove it if not applicable. Thanks!
,
Jun 11 2018
,
Jun 11 2018
Note, the date part in the summary on this bug is wrong: > Date errors on dates less than 1847-12-14 00:01:15 it should be 1847-12-01 00:01:15. This error is then repeated in several parts of the post. However, the javascript examples have the correct date in them. For info, if testing in Pacific Standard Time an error in seconds is not observed: > new Date(1847,11,1,0,1,14) > Wed Dec 01 1847 00:01:14 GMT-0752 (Pacific Standard Time) However, the GMT offset looks wrong - i.e. should be GMT-0800. This apparent error in the offset occurs at 1883-11-18 12:07:01: > new Date(1883,10,18,12,7,1) > Sun Nov 18 1883 12:07:01 GMT-0752 (Pacific Standard Time) > new Date(1883,10,18,12,7,2) > Sun Nov 18 1883 12:07:02 GMT-0800 (Pacific Standard Time) This 8 minute difference does not seem explainable by https://chromium-review.googlesource.com/c/v8/v8/+/572148.
,
Jun 11 2018
,
Jun 11 2018
This is just accurately reflecting the historical change of Europe/London. Working as intended. I guess you meant Europe/London by "GMT". Note that Europe/London before 1847 was 75 seconds behind "the current day UTC". When your default timezone is Europe/London, 'new Date(1847,11,1,0,1,14)' (interpreted as a localtime) correspond to 1847-12-01T000229 in "UTC". See typeOffsets:intvector below taken from https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/zoneinfo64.txt?rcl=f61e46dbee9d539a32551493e3bcc1dea92f83ec&l=2213 ). /* Europe/London */ :table { transPre32:intvector { -1, 442304971 } trans:intvector { -1691964000, -1680472800, -1664143200, -1650146400, -1633903200, -1617487200, -1601848800, -1586037600, -1570399200, -1552168800, -1538344800, -1522533600, -1507500000, -1490565600, -1473631200, -1460930400, -1442786400, -1428876000, -1410732000, -1396216800, -1379282400, -1364767200, -1348437600, -1333317600, -1315778400, -1301263200, -1284328800, -1269813600, -1253484000, -1238364000, -1221429600, -1206914400, -1189980000, -1175464800, -1159135200, -1143410400, -1126476000, -1111960800, -1095631200, -1080511200, -1063576800, -1049061600, -1032127200, -1017612000, -1001282400, -986162400, -969228000, -950479200, -942012000, -904518000, -896050800, -875487600, -864601200, -844038000, -832546800, -812588400, -798073200, -781052400, -772066800, -764805600, -748476000, -733356000, -719445600, -717030000, -706748400, -699487200, -687996000, -668037600, -654732000, -636588000, -622072800, -605743200, -590623200, -574293600, -558568800, -542239200, -527119200, -512604000, -496274400, -481154400, -464220000, -449704800, -432165600, -417650400, -401320800, -386200800, -369266400, -354751200, -337816800, -323301600, -306972000, -291852000, -276732000, -257983200, -245282400, -226533600, -213228000, -195084000, -182383200, -163634400, -150933600, -132184800, -119484000, -100735200, -88034400, -68680800, -59004000, -37242000, 57722400, 69818400, 89172000, 101268000, 120621600, 132717600, 152071200, 164167200, 183520800, 196221600, 214970400, 227671200, 246420000, 259120800, 278474400, 290570400, 309924000, 322020000, 341373600, 354675600, 372819600, 386125200, 404269200, 417574800, 435718800, 449024400, 467773200, 481078800, 499222800, 512528400, 530672400, 543978000, 562122000, 575427600, 593571600, 606877200, 625626000, 638326800, 657075600, 670381200, 688525200, 701830800, 719974800, 733280400, 751424400, 764730000, 782874000, 796179600, 814323600, 828234000, 846378000 } typeOffsets:intvector { -75, 0, 0, 0, 0, 3600, 0, 7200, 3600, 0 } typeMap:bin { "01020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020302030203020302030201020102030201020102010201020102010201020102010201020102010201020102010201020102010201020102010204010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201020102010201" } finalRule { "EU" } finalRaw:int { 0 } finalYear:int { 1997 } links:intvector { 442, 454, 456, 458, 464, 502, 503 } } //Z#464
,
Jun 11 2018
See also https://www.timeanddate.com/time/zone/uk/london and select 1800-1849 and 1925-1949 ( Time Changes in London Over the Years ).
,
Jun 11 2018
WIth the timezone set to Europe/London: I got the following. new Date(1845,0,1) Wed Jan 01 1845 00:00:00 GMT-0001 (Greenwich Mean Time) new Date(1847,11,1) Wed Dec 01 1847 00:01:15 GMT+0000 (Greenwich Mean Time) new Date(1847,10,30) Tue Nov 30 1847 00:00:00 GMT-0001 (Greenwich Mean Time) new Date(1847,11,1,2) Wed Dec 01 1847 02:00:00 GMT+0000 (Greenwich Mean Time) new Date(1847,11,1,1) Wed Dec 01 1847 01:00:00 GMT+0000 (Greenwich Mean Time) new Date(1847,11,1,0,5) Wed Dec 01 1847 00:05:00 GMT+0000 (Greenwich Mean Time) new Date(1847,11,1,0,2) Wed Dec 01 1847 00:02:00 GMT+0000 (Greenwich Mean Time) new Date(1847,11,1,0,1) Wed Dec 01 1847 00:02:15 GMT+0000 (Greenwich Mean Time) Everything is working as intended and per spec. Note that the time between 1847-12-01T00:00:00 and 1847-12-01T00:01:15 is *skipped* when Europe/London made a transition from 'Local Mean Time' (75 sec behind GMT) to GMT Per the latest Ecma 262 spec, the skipped time is interpreted with the zone offset *before* the transition. So, 1847-12-01T00:01:00 is interpreted with the zone offset of -75 sec, which is translated into 1847-1-01T:00:02:15 in UTC/GMT.
,
Jun 11 2018
,
Jun 11 2018
Agreed then (whilst also accepting this is a bit of a headache).
,
Jun 12 2018
,
Jun 20 2018
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by jason.sa...@redskyit.com
, Jun 8 2018