new Date() Operating System Dependent?

后端 未结 5 513
伪装坚强ぢ
伪装坚强ぢ 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:25

    It is implementation dependent, meaning it is operating system and browser dependent, making it not very reliable if you want a consistent result.

    If you want to parse it consistently in a specific way your best bet is gonna be to parse it out manually in code or to use a package like datejs or similar.

提交回复
热议问题