Sometimes the day of week displays incorrectly for timezone settings

Kruzya

Well-known member
Affected version
2.2.2
Few notices:
  • The default timezone for all users (include guests) on forum - GMT+3 (Moscow).
  • I live in Izhevsk, where timezone - GMT+4 (Samara).
  • On my PC in OS options, the timezone is GMT+4. On forum - GMT+3 (Moscow) for comfort performing moderator duties.
Sometimes in different parts of the forum, i can see "incorrect" day of week:
firefox_nsfPj5WzOZ.png
For example, on this screen you can see "Wednesday" as "01.12.2021" day of week. This is wrong: the right day of week for this date - Tuesday, but by unknown reason, forum displays Wednesday. It looks like JS uses OS settings for formatting day of week, because 11:15PM in my timezone - 12:15AM (next day, 01.13.2021).
If i refresh the page, first second after page refresh, i can see the right day of week ("Tuesday"), but it replaces to wrong ("Wednesday"). JS recalculates the date?..

I can reproduce this in any browser: Firefox, Chrome and even in Safari!
 
Back
Top Bottom