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.

Search Support

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.

Learn More

Hierdie gesprek is in die argief. Vra asseblief 'n nuwe vraag as jy hulp nodig het.

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

  • 2 antwoorde
  • 1 het hierdie probleem
  • 23 views
  • Laaste antwoord deur 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.

Gewysig op deur brisdaz

All Replies (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

Gewysig op deur jscher2000 - Support Volunteer

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