[Newgistics] Time zone は America/Denver – MT(MST/MDT)
Newgistics の Time zone を調べて、tz database 名は America/Denver で MT (MST/MDT) ということが分かった調査内容をご紹介します。
概要
- Newgistics API ドキュメントに timezone が明記されてない
- Newgistics 担当者に質問しても「たぶん MT」と曖昧な回答をいただいた
- MT は DST 有り・無しの地域があるので、エリアがどこかも重要
- Newgistics の timezone は America/Denver
Time zone の前提知識
MT (MST/MDT)
Mountain Time エリア
Mountain Time に該当する tz database 名は以下のとおりです。
- America/Boise
- America/Cambridge_Bay
- America/Denver
- America/Edmonton
- America/Inuvik
- America/Ojinaga
- America/Yellowknife
Time zone
Currently Mountain Daylight Time (MDT), UTC -6
Standard time (Mountain Standard Time (MST), UTC -7) starts November 3, 2019The IANA time zone identifiers for Mountain Time are America/Boise, America/Cambridge_Bay, America/Denver, America/Edmonton, America/Inuvik, America/Ojinaga and America/Yellowknife.
America/Phoenix は DST 無し
上記のリストには載ってないですが、tz database 名が America/Phoenix のように DST(サマータイム)無しで MST なだけなケースもあるみたいです。
Note that these abbreviations may change depending on the time zone offset. This helps to distinguish offsets between places that may or may not use DST.
// Denver observes DST
moment.tz([2012, 0], ‘America/Denver’).format(‘Z z’); // -07:00 MST
moment.tz([2012, 5], ‘America/Denver’).format(‘Z z’); // -06:00 MDT
// Phoenix does not observe DST
moment.tz([2012, 0], ‘America/Phoenix’).format(‘Z z’); // -07:00 MST
moment.tz([2012, 5], ‘America/Phoenix’).format(‘Z z’); // -07:00 MST
Newgistics は America/Denver
rocketsofawesome/newgistics-ruby: Ruby client for the Newgistics API によると、Newgistics は America/Denver を利用しているようでした。
Option
time_zoneDescription
The time zone used by Newgistics. When the API sends timestamps back it doesn’t include a time zone, if it’s not provided, the value of this setting will be used when parsing the timestamps into Time objects. You shouldn’t need to change this settingDefault Value
“America/Denver”
以上、Newgistics の Time zone を知りたい、現場からお送りしました。