This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Etsi tuesta

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Lue lisää

gettimezoneoffset is wrong - shows -0600 when it should be +1000

  • 2 vastausta
  • 1 henkilöllä on sama ongelma
  • 23 näyttöä
  • Viimeisin kirjoittaja cor-el

more options

Going to http://www.localeplanet.com/support/browser.html shows:

*****

navigator.browserLanguage: undefined

navigator.language: en-GB

navigator.userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0

date: Wed Dec 25 2019 10:19:57 GMT+1000 (Australian Eastern Standard Time)

date.toLocaleDateString(): 25/12/2019

date.toLocaleTimeString(): 10:19:57

date.toLocaleString(): 25/12/2019, 10:19:57

date.toUTCString(): Wed, 25 Dec 2019 00:19:57 GMT

date.getTimezoneOffset(): -600

*****

This produces errors in some web pages.

Going to http://www.localeplanet.com/support/browser.html shows: ***** navigator.browserLanguage: undefined navigator.language: en-GB navigator.userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0 date: Wed Dec 25 2019 10:19:57 GMT+1000 (Australian Eastern Standard Time) date.toLocaleDateString(): 25/12/2019 date.toLocaleTimeString(): 10:19:57 date.toLocaleString(): 25/12/2019, 10:19:57 date.toUTCString(): Wed, 25 Dec 2019 00:19:57 GMT date.getTimezoneOffset(): -600 ***** This produces errors in some web pages.

Muokattu , muokkaaja brisdaz

Kaikki vastaukset (2)

more options

I think that is correct.

My time zone offset is 480, or 8 hours x 60 minutes behind GMT.

Your -600 represents 10 hours x 60 minutes ahead of GMT.

Merry Christmas!

Ref. https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset

Muokattu , muokkaaja jscher2000 - Support Volunteer

more options
  • (new Date()).toLocaleString("en-AU",{"timeZoneName":"short"});