Nutomic / ibis

A federated online encyclopedia
https://ibis.wiki/
GNU Affero General Public License v3.0
134 stars 7 forks source link

Display date/time in UTC and not local timezone #71

Open K4LCIFER opened 2 weeks ago

K4LCIFER commented 2 weeks ago

I have so far found that the diff viewer and edit history viewer both render the stored UTC time in local time, as shown in the following files: https://github.com/Nutomic/ibis/blob/8fa4fb1078416cd25c9c09d0ee79db85cbf202fa/src/frontend/pages/diff.rs#L33 https://github.com/Nutomic/ibis/blob/8fa4fb1078416cd25c9c09d0ee79db85cbf202fa/src/frontend/pages/article/history.rs#L41 using the following function that converts to local time: https://github.com/Nutomic/ibis/blob/8fa4fb1078416cd25c9c09d0ee79db85cbf202fa/src/frontend/mod.rs#L58-L63 I think that all of these public histories/ledgers should actually display UTC, and not local time. They are for public communication so they should all display a common time.

Nutomic commented 2 weeks ago

I looked at Wikipedia and it also seems to show local time without timezone. That makes more sense to me, otherwise users need to manually convert every time to figure out what the utc time means for them.

K4LCIFER commented 2 weeks ago

I looked at Wikipedia and it also seems to show local time without timezone. That makes more sense to me, otherwise users need to manually convert every time to figure out what the utc time means for them.

Fundamentally, all that matters for a edit history is the time of one edit relative to another. The rationale that I had behind using UTC only is for standardization. All editors would reference UTC instead of having to convert between each others times if editors were comparing. I don't really think the local time is all that important — why would one really even need to know what time someone else's edit happened locally? All that matters is that people have a common time to compare, necessitating the conversion between timezones only adds an obstacle in the middle of that process.