Moment-timezone: add support for UTC timezone

Created on 3 Feb 2014  路  7Comments  路  Source: moment/moment-timezone

moment.tz('UTC') should be a valid synonym for moment.utc()

Right now:

moment().tz('UTC')
TypeError: Cannot call method 'rule' of undefined

Most helpful comment

This is released in 0.1.0.

All 7 comments

+1

I also just ran into this issue. Ruby on rails maps this timezone to the value Etc/UTC.
http://api.rubyonrails.org/classes/ActiveSupport/TimeZone.html

I guess that's the standard identifier?

IANA's timezone database specifies Etc/UTC as the long name and UTC as the short name for the same entry. At least Etc/GMT is also specified in POSIX.

So I'm guessing the ticket should be: support all standard Tz's instead of just a random subset.

Ran into the same issue. Agree with @himdel, all standard Timezones should be supported.

Version 0.1.0 will have support for moment().tz('UTC'), see this entry in the latest data build.

@timrwood what about Etc/UTC?

Never mind see it there now: https://github.com/moment/moment-timezone/blob/b58fdcef24fc161eeb3e59bfe5e1a3edcd000529/data/packed/latest.json#L413 ;)

This is released in 0.1.0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GMeulendyks picture GMeulendyks  路  5Comments

im1dermike picture im1dermike  路  4Comments

rjpedrosa picture rjpedrosa  路  5Comments

casper5822 picture casper5822  路  5Comments

garryyao picture garryyao  路  4Comments