Angular Moment Timezones


#1

Hi Developers,

Does anybody here have successfully integrated angular moment js with certain timezone assigned to it? I managed to add this plugin to my project, but I need to set a timezone since I am getting a wrong output. Please Help!

Thanks! :slight_smile:


#2

Angular Moment.js uses moment.js so you can use http://momentjs.com/timezone/ to define your timezones.


#3

Thanks @delta98. But will this work on mobile?


#4

Absolutely, Iā€™m assuming you are just specifying a timezone .tz("Europe/London"); and not needing to auto detect?


#5

Yes. I am trying to fixed the timezone to a certain place.


#6

Read http://momentjs.com/timezone/ and use .tz("Europe/London");


#7

It worked. I just followed the documentation and imported the moment-timezone.js.

Thank you!