Closed mickbyrne closed 5 years ago
I think you need to interact with the moment service to change the timezone for moment-format. Try setting the display timezone there and see if that gets you anywhere.
Turns out I hadn't correctly installed the 'moment-timezone' package. Once I installed this into my Ember solution (using bower) everything started working fine.
Thanks for the help @scottkidder
I have a model that creates a property as a
moment
instance, always at UTC time. When being displayed in my template, I'd like to have the moment changed to a different timezone. I've tried this in my.hbs
template:But it continues to output the time in UTC. I've also tried creating a computed property on my model like:
However, this throws an error saying that there's no 'tz' function on that object.
Perhaps I'm not including the moment-timezone.js thing properly? I've tried adding this to my
config/environment.js
file, but no luck:I feel like I'm missing something obvious...