Skip to content
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

When converting datetime to GMT or UTC result gets 21seconds added #3001

Closed
ThePasko opened this issue Mar 4, 2016 · 2 comments
Closed

When converting datetime to GMT or UTC result gets 21seconds added #3001

ThePasko opened this issue Mar 4, 2016 · 2 comments

Comments

@ThePasko
Copy link

ThePasko commented Mar 4, 2016

When converting a specific datetime value to GMT or UTC the output is a bit confusing:
moment.tz("1751-01-01T00:00:00", "Europe/Dublin").clone().tz("Europe/London").format("YYYY-MM-DDTHH:mm:ss.SSSS") -> "1751-01-01T00:25:21.0000"
or this
moment.tz("1751-01-01T00:00:00", "Europe/Dublin").clone().utc().format("YYYY-MM-DDTHH:mm:ss.SSSS") -> "1751-01-01T00:25:21.0000"

The first thing I learned here is that the 25min added is actually not a bug :)
But what about the extra 21 seconds added in both cases?? Is that a bug?

@maggiepint
Copy link
Member

It appears that the Europe/Dublin timezone did indeed have a -00:25:21 offset from August 2nd 1880 to October 1st 1916.
Search for Europe/Dublin in the following file:
ftp://ftp.iana.org/tz/data/europe

I realize that your time range predates this. I think there may be something going on with how far back the IANA data goes in Moment-timezone.

If you were to re-post this issue in the moment-timezone repository instead of in the moment repository, @timrwood would get around to looking at it.

@ThePasko
Copy link
Author

ThePasko commented Mar 7, 2016

Thanks!
I reposted in moment-timezone repository moment/moment-timezone#308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants