/moment-timezone

Timezone support for moment.js

Primary LanguageJavaScriptMIT LicenseMIT

Adam's fork notes:

I wish I had made better notes at the time, but as I'm archiving this in 2023, I'm writing my best recollection of the purpose of this fork. I was working on a Node.js app that displayed reductions and visualizations of IoT sensor data over custom time ranges that the customer could pick. There was some erratum in the source time zone data in moment-timezone that was causing trouble for one of our customers. This had been corrected in the latest tz data provided by https://www.iana.org/time-zones, but none of the moment-timezone maintainers had integrated it yet. So I just did it, and ran out of time to contribute back. I think there was also some concern about the msyql formatted time. There was some reason why it wouldn't have been a complete contribution which I can't remember.

Archiving this because it's not useful anymore, but fun to have a record of what I did.

Join the chat at https://gitter.im/moment/moment-timezone

NPM version NPM downloads MIT License Build Status

IANA Time Zone Database + Moment.js.

var june = moment("2014-06-01T12:00:00Z");
june.tz('America/Los_Angeles').format('ha z'); // 5am PDT
june.tz('America/New_York').format('ha z');    // 8am EDT
june.tz('Asia/Tokyo').format('ha z');          // 9pm JST
june.tz('Australia/Sydney').format('ha z');    // 10pm EST

var dec = moment("2014-12-01T12:00:00Z");
dec.tz('America/Los_Angeles').format('ha z');  // 4am PST
dec.tz('America/New_York').format('ha z');     // 7am EST
dec.tz('Asia/Tokyo').format('ha z');           // 9pm JST
dec.tz('Australia/Sydney').format('ha z');     // 11pm EST