Friday, 15 April 2011

momentjs - Is the client timezone the same as what's specified for the user (javascript / moment.js / moment-timezone.js) -



momentjs - Is the client timezone the same as what's specified for the user (javascript / moment.js / moment-timezone.js) -

i'd able timezone client browser running in, can compare user's home timezone, know via config alternative "america/vancouver". i'm using moment.js , moment-timezone.js, , can't figure out how that!

update: don't need client's timezone functionality want - need know if it's different 1 have specified user's in config option. have found solution problem, doesn't require loading exclusively new library, below.

(question updated create more clear.)

i'm not sure difference between "client's browser" , "user's timezone"?

you can current user's timezone offset gmt in minutes using:

moment().zone();

moment.js docs timezone offset

javascript momentjs timezoneoffset

No comments:

Post a Comment