new Date() Operating System Dependent?

后端 未结 5 494
伪装坚强ぢ
伪装坚强ぢ 2021-01-17 07:07

Alright so I\'m using javascript to return the shorthand timezone of the users system time with a simple regex like so

new RegExp(\'\\\\(.*\\\\)\').exec(new          


        
5条回答
  •  余生分开走
    2021-01-17 07:34

    It doesn't make sense, because javascript.

    However, you can get the timezone offset by this way:

    yourDate.getTimezoneOffset();
    

    This will return the browser clients offset in minutes. See getTimezoneOffset()

提交回复
热议问题