-
Notifications
You must be signed in to change notification settings - Fork 7.3k
DateTimeFormat error for Chilean Time #25834
Comments
I believe its a discrepency in the timezone parsing. From chrome js console
It seems to be picking up the 'CLT' (which is actually GMT-0400).
seems to be using the 'GMT-0300' string rather than recognizing 'CLT' |
@dnakamura maybe you meant (GMT -0300) on your second code block, right? Anyway, I don't seem to get the (Eastern Daylight Time) on chrome, I get the same output than the one I'm writing below, which might be caused by you being in a different time zone than mine. Mon Jun 15 2015 21:43:11 GMT-0300 (CLT) |
@tomascharad Ah apparently I got confused. chrome and node seem to be in agreement parsing "Mon Jun 15 2015 21:43:11 GMT-0300 (CLT)" into "Mon Jun 15 2015 20:43:11 GMT-0400 (Eastern Daylight Time)" . Are you running chrome and node on the same machine? |
Look, here is the full log of the actions on chrome:
And on Node:
|
Also, just for having more background, if I do on Chrome:
and then on Node:
|
May be fixed by #25855 if the timezone data was in ICU 55 |
@tomascharad can you try the upgrade procedure in https://github.com/joyent/node/wiki/Intl#updating-timezone-data ? |
@srl295 Could you please let me know where should I change ICU_TIMEZONE_FILES_DIR? |
Set it in the environment. With set or setenv before node starts. El sábado, 22 de agosto de 2015, Tomás Charad [email protected]
|
@tomascharad sorry for the slow confirmation. It is due to the tz version. In the latest released node which has ICU 55 it seems to be working:
Above I discuss how to update the tz data. If it's not working, please reopen nodejs/node#2372 or a new issue. Thanks! |
(node v.0.12.7)
On chrome's V8 the output of the following code:
date = new Date('Mon Jun 15 2015 21:43:11 GMT-0300 (CLT)')
formatter = Intl.DateTimeFormat('En-us', { hour: 'numeric', hour12: false })
formatter.format(date)
Is "21".
However if I do the same on a node console I obtain '20'.
In Chile we've faced a change of our "Winter time" and this might be causing this issue.
Maybe there is something needed to be updated in the Intl module?
The text was updated successfully, but these errors were encountered: