adopted-ember-addons / adopted-ember-addons/ember-moment
Returning and overriding the timeZone within tests
- 主要言語
- JavaScript
- スター
- 398
- フォーク
- 120
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I can't determine if this is something that is automatic and I'm just experiencing a setup/config issue or if my assumption on this is off.
Does ember-moment have a service that automatically returns you the user's/current timeZone?
I'm attempting `this.get('moment.timeZone')` but it returns null. (However, I can set it with `this.get('moment').setTimeZone('America/Los_Angeles');`)
We've recently changed some of the date/time formatting within our application and I'm working on rendering the UTC date/time. This portion I haven't had any problems with. The issue I'm running into is overriding this during our testing to force a consistent timeZone. I assumed that the best way to do this was to setup a `config/environment` timeZone variable and when applicable set the timeZone global on the moment service which can then be distilled down to instances of `{{moment-format ...}}`.
Is this an appropriate strategy?
Thanks!
コントリビューションガイド
評価
この issue はまだ評価されていません。