jeudi 19 janvier 2017

ember-moment not displaying correct time zone

I'm using ember-moment 4.2.1

I have two properties in my model called dstStartDate and dstStopDate both with date attributes.

dstStartDate: DS.attr('date'), dstStopDate: DS.attr('date'),

For example in my console they are:

dstStartDate:"1970-01-01T10:00:00"
dstStopDate:"1970-01-01T10:00:00"

In my template, I want it rendered with the UTC timeZone.

Component Code snippet (js):

  valueType: computed('value', function() {
    return typeOf(get(this, 'value'));
  }),

Template Code snippet (hbs):


  

So with the start date it should render as 10 am Indian Standard Time but it comes out as 8pm.

Thursday, January 1, 1970 8:00 PM

Modifying the timeZone to another value such as "America/Los_Angeles" does nothing. Any suggestions?




Aucun commentaire:

Enregistrer un commentaire