Om de ûnderfining foar jo te ferbetterjen is tydlik de funksjonaliteit dan dizze website troch ûnderhâldswurk beheind. Wannear in artikel jo probleem net oplost en jo in fraach stelle wolle, kin ús stipemienskip jo helpe yn @FirefoxSupport op Twitter en /r/firefox op Reddit.

Sykje yn Support

Mij stipescams. Wy sille jo nea freegje in telefoannûmer te beljen, der in sms nei ta te stjoeren of persoanlike gegevens te dielen. Meld fertochte aktiviteit mei de opsje ‘Misbrûk melde’.

Mear ynfo

Dizze konversaasje is argivearre. Stel in nije fraach as jo help nedich hawwe.

Problem with date and timezones

  • 2 antwurd
  • 1 hat dit probleem
  • 10 werjeftes
  • Lêste antwurd fan Vampire_2008

more options

Hello! I have issue on JavaScript with Date and Timezones. I am c# developer. I have date from programm 24 July 2014. Internet Explorer 11 displays this date correct. But Firefox displays this date as 23 July 2014. I debug code and found this. My timezone is RTZ7 (Irkutsk) (current UTC+8). Internet Explorer saves date variable with timezone of this date (UTC+9) and when I format Date to string it saves timezone UTC+9. Firefox saves date variable without timezone in UTC format. 24 July 2014 00:00 - 9 hours = 23 July 2014 15:00. And when I format this Date to string I get 23 July 2014 23:00. Firefox add 8 hours to date, not 9 hours. In July 2014 my timezone was UTC+9. Why Firefox not save original timezone?

Hello! I have issue on JavaScript with Date and Timezones. I am c# developer. I have date from programm 24 July 2014. Internet Explorer 11 displays this date correct. But Firefox displays this date as 23 July 2014. I debug code and found this. My timezone is RTZ7 (Irkutsk) (current UTC+8). Internet Explorer saves date variable with timezone of this date (UTC+9) and when I format Date to string it saves timezone UTC+9. Firefox saves date variable without timezone in UTC format. 24 July 2014 00:00 - 9 hours = 23 July 2014 15:00. And when I format this Date to string I get 23 July 2014 23:00. Firefox add 8 hours to date, not 9 hours. In July 2014 my timezone was UTC+9. Why Firefox not save original timezone?

Alle antwurden (2)

more options
more options

Variable Date I parse from MS Timestamp.

timestamp = new Date(parseInt(msMatch[1], 10));

Then I convert to custom format string with: G = timestamp.getHours(),//return 23 hours i = timestamp.getMinutes(), j = timestamp.getDate(), n = timestamp.getMonth() + 1, o = timestamp.getTimezoneOffset(),//return UTC+8 s = timestamp.getSeconds(), u = timestamp.getMilliseconds(), w = timestamp.getDay(), Y = timestamp.getFullYear(),