0

What is the best way to get the user's timezone? I'm using the MEAN stack and also have moment available to me. I would like to get the users timezone? I can do some regex but I would rather keep it simple and use either the Angular or moment framework?

The following params are no deprecated:

moment().format('zz')
moment().format('z')

Nice script available but due to late testing, not allowed to use it, https://github.com/entraigas/jstz

Thanks.

J

user1859465
  • 883
  • 1
  • 11
  • 28
  • 1
    http://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript – YOU Apr 13 '15 at 12:34
  • Thanks, from reading the post which linked to http://stackoverflow.com/questions/1091372/getting-the-clients-timezone-in-javascript, I'm going to use new Date().toString().match(/([A-Z]+[\+-][0-9]+)/)[1] which will give me GMT+0100 – user1859465 Apr 13 '15 at 12:40

0 Answers0