We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
guess()
Hello!
We recently experienced a "breaking" change while upgrading to latest Node.js:
$ nvm use v8.11.1 Now using node v8.11.1 (npm v5.6.0) $ TZ=Universal node -e "const m = require('moment-timezone'); console.log(m.utc().tz(m.tz.guess()).zoneAbbr())" UTC $ TZ=Universal node -e "const m = require('moment-timezone'); console.log(m.tz.guess())" Etc/UTC $ nvm use v10.12.0 Now using node v10.12.0 (npm v6.4.1) $ TZ=Universal node -e "const m = require('moment-timezone'); console.log(m.utc().tz(m.tz.guess()).zoneAbbr())" GMT $ TZ=Universal node -e "const m = require('moment-timezone'); console.log(m.tz.guess())" Africa/Abidjan
In both cases, the intlName returned by rebuildGuess() is 'UTC', but I found that userOffsets() returns something completely different:
intlName
rebuildGuess()
'UTC'
userOffsets()
# node 10 [ OffsetAt { at: 1451606400000, abbr: undefined, offset: 0 }, OffsetAt { at: 1451606400000, abbr: undefined, offset: 0 }, OffsetAt { at: 1467331200000, abbr: undefined, offset: 0 }, OffsetAt { at: 1483228800000, abbr: undefined, offset: 0 }, OffsetAt { at: 1498867200000, abbr: undefined, offset: 0 }, OffsetAt { at: 1514764800000, abbr: undefined, offset: 0 }, OffsetAt { at: 1530403200000, abbr: undefined, offset: 0 }, OffsetAt { at: 1546300800000, abbr: undefined, offset: 0 }, OffsetAt { at: 1561939200000, abbr: undefined, offset: 0 } ]
# node 8 [ OffsetAt { at: 1451606400000, abbr: 'UTC', offset: 0 }, OffsetAt { at: 1451606400000, abbr: 'UTC', offset: 0 }, OffsetAt { at: 1467331200000, abbr: 'UTC', offset: 0 }, OffsetAt { at: 1483228800000, abbr: 'UTC', offset: 0 }, OffsetAt { at: 1498867200000, abbr: 'UTC', offset: 0 }, OffsetAt { at: 1514764800000, abbr: 'UTC', offset: 0 }, OffsetAt { at: 1530403200000, abbr: 'UTC', offset: 0 }, OffsetAt { at: 1546300800000, abbr: 'UTC', offset: 0 }, OffsetAt { at: 1561939200000, abbr: 'UTC', offset: 0 } ]
When setting a different timezone with TZ env variable, results are consistent.
TZ
Any clue? (I'm working from Europe/Paris, but friend from Europe/London is experiencing the same).
The text was updated successfully, but these errors were encountered:
Up?
Sorry, something went wrong.
We are running into this issue as well. Any news?
Is this still an issue?
No branches or pull requests
Hello!
We recently experienced a "breaking" change while upgrading to latest Node.js:
In both cases, the
intlName
returned byrebuildGuess()
is'UTC'
, but I found thatuserOffsets()
returns something completely different:When setting a different timezone with
TZ
env variable, results are consistent.Any clue?
(I'm working from Europe/Paris, but friend from Europe/London is experiencing the same).
The text was updated successfully, but these errors were encountered: