1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-21 08:31:27 -05:00
forgejo/web_src
Kemal Zebari 16eb85adfb
Have time.js use UTC-related getters/setters (#30857)
Before this patch, we were using `Date` getter/setter methods that
worked with local time to get a list of Sundays that are in the range of
some start date and end date. The problem with this was that the Sundays
are in Unix epoch time and when we changed the "startDate" argument that
was passed to make sure it is on a Sunday, this change would be
reflected when we convert it to Unix epoch time. More specifically, I
observed that we may get different Unix epochs depending on your
timezone when the returned list should rather be timezone-agnostic.

This led to issues in US timezones that caused the contributor, code
frequency, and recent commit charts to not show any chart data. This fix
resolves this by using getter/setter methods that work with UTC since it
isn't dependent on timezones.

Fixes #30851.

---------

Co-authored-by: Sam Fisher <fisher@3echelon.local>
(cherry picked from commit 22c7b3a74459833b86783e84d4708c8934d34e58)
2024-05-12 20:03:09 +02:00
..
css Add class tw-break-anywhere 2024-05-11 18:15:29 +05:00
fomantic Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
js Have time.js use UTC-related getters/setters (#30857) 2024-05-12 20:03:09 +02:00
svg Customizable "Open with" applications for repository clone (#29320) 2024-03-23 11:58:54 +01:00