Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Learn More

Problem with date and timezones

  • 2 svar
  • 1 har detta problem
  • 10 visningar
  • Senaste svar av 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?

Alla svar (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(),