Skip to content
New issue

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

Returning and overriding the timeZone within tests #236

Open
aaronfischer opened this issue May 7, 2017 · 0 comments
Open

Returning and overriding the timeZone within tests #236

aaronfischer opened this issue May 7, 2017 · 0 comments

Comments

@aaronfischer
Copy link

aaronfischer commented May 7, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant