-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timezone database error (Europe/Budapest) #450
Comments
I believe this is a dup of #308 |
I don't agree. Explain this. Moment moment('1890-01-01T00:00:00Z').clone().tz('Europe/Paris').format()
// "1890-01-01T00:09:21+00:09" // CORRECT
moment('1890-01-01T00:00:00Z').clone().tz('Europe/Budapest').format()
// "1890-01-01T01:00:00+01:00" // WRONG
// It should be "1890-01-01T01:16:20+01:16" Java DateTime API @Test
public void testParisTime() {
ZonedDateTime parisTime = OffsetDateTime.parse("1890-01-01T00:00:00Z").atZoneSameInstant(ZoneId.of("Europe/Paris"));
Assert.assertEquals("1890-01-01T00:09:21+00:09:21", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(parisTime));
}
@Test
public void testBudapestTime() {
ZonedDateTime budapestTime = OffsetDateTime.parse("1890-01-01T00:00:00Z").atZoneSameInstant(ZoneId.of("Europe/Budapest"));
Assert.assertEquals("1890-01-01T01:16:20+01:16:20", DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(budapestTime));
} |
Cause I can not reopen this issue, I created a new one: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of the Issue and Steps to Reproduce:
I think I have just found a timezone database parse(?) error.
moment.tz("1890-01-01 00:00", "Europe/Paris").format()
// "1890-01-01T00:00:00+00:09" // OK
moment.tz("1890-01-01 00:00", "Europe/Bucharest").format()
// "1890-01-01T00:00:00+01:44" // OK
moment.tz("1890-01-01 00:00", "Europe/Budapest").format()
// "1890-01-01T00:00:00+01:00" // WRONG
// It should be "1890-01-01T00:00:00+01:16:20" (or at least +01:16)
moment.tz('1890-01-01 01:16:20', 'Europe/Budapest').clone().tz('UTC').format()
// "1890-01-01T00:16:20Z" // WRONG
// It should be "1890-01-01T00:00:00Z"
From the tzdb-2016j:
It means, the tzdb is correct.
I guess the JS code is correct and the tzdb parser should be fixed (cause other time-zones are well-parsed).
Environment:
Chrome 55 on Ubuntu 14.04.5 LTS
System timezone: Europe/Budapest
The text was updated successfully, but these errors were encountered: