adopted-ember-addons / ember-moment

MIT License
400 stars 122 forks source link

Timezone doesn't apply #311

Open mikeelemuel opened 5 years ago

mikeelemuel commented 5 years ago

Versions

"ember-cli": "2.6.2", "ember-moment": "4.1.0",

My template.hbs has a code below but doesn't show the correct date based on the timeZone defined on addon

    {{moment-format model.createdAt "MMM DD, YYYY · LT" timeZone="Singapore"}}

on my config/environment.js I also included the code below

        moment: {
          includeTimezone: 'all'
        },

Any response is much appreciated, thank you

wagenet commented 5 years ago

@mikeelemuel if you manually create a new moment object in the console does it have the tz method defined?

wagenet commented 5 years ago

https://github.com/stefanpenner/ember-moment/blob/bef0f56ab7277070dff8a595ecd4fdb509a3ac0b/addon/helpers/-base.js#L42-L44

cah-brian-gantzler commented 4 years ago

we found that all did not work. tried ranges, no luck, The only thing we got to work or at least not error was below

'moment': {
      // Options:
      // 'all' - all years, all timezones
      // 'subset' - modern time zones
      // 'none' - no data, just timezone API
      includeTimezone: 'subset'
    },

I thought I would look in the code and see what was really happening but cant find it. Where in the code is this config item even being referenced?

Also the ember-try seems really out of date. I looked because the commits said there was an update of a dependency ember-awesome-macros which states it only supports 3.8 + was trying to figure out what this addon actually supports.