Closed hoIIer closed 7 years ago
Are you setting the timeZone globally or passing it in as an attribute?
https://github.com/stefanpenner/ember-moment#configure-default-runtime-localetimezone
I have got a similar issue. I have a server date which is represented in UTC "Tue Jun 20 2017 08:02:35 GMT+0200" but my local time is +2. Ember moment still shows UTC.
My setup:
package.json: "ember-moment": "^7.3.1"
env~.js moment: { includeLocales: ['de'], includeTimezone: 'all' },
application router: moment: Ember.inject.service(), beforeModel() { this.get('moment').setTimeZone('Europe/Berlin'); //with or without, same result }
in my template: {{moment-from-now regionRolesChange.created_at hideSuffix=false}} --OUTPUTS UTC
{{regionRolesChange.created_at}} -- OUTPUTS "Tue Jun 20 2017 08:02:35 GMT+0200"
I got it running with this transform https://github.com/thoughtbot/ember-utc-transform
If anyone can replicate the issue and push an example somewhere please do and reopen.
Hello,
I have a time that is ahead a few hours in timezone that is being displayed improperly, how could I resolve this?
Example: The time should be displayed as "a few seconds ago" but instead it is "in 3 hours"
I added that per the docs but no effect,
thanks!