adopted-ember-addons / ember-moment

MIT License
400 stars 122 forks source link

[ember-moment] attempted to set timezone, but moment-timezone is not setup. #313

Open mculpsf opened 5 years ago

mculpsf commented 5 years ago

I'm getting [ember-moment] attempted to set timezone, but moment-timezone is not setup. and I've read through the other issues in this repo and tried everything with no luck.

$ ember -v

ember-cli: 2.18.2
node: 10.14.2
$ bower list

├── moment#2.24.0
├─┬ moment-timezone#0.5.25
│ └── moment#2.24.0
// environment.js

module.exports = function(environment) {
  let ENV = {
    // ...
    moment: {
      includeTimezone: 'all'
    }
  };
  return ENV;
};

Nothing related to moment in ember-cli-build.js.

Any ideas? Thanks!

vvsalmin commented 4 years ago

same problem here .. started when we took ember-auto-import in use :|

vvsalmin commented 4 years ago

got that working by adding

import 'moment-timezone';

on top of the file where I used .changeTimeZone(...) ... dunno why it worked but I'm happy with it now...