Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
K4LCIFER opened this issue Oct 19, 2024 · 2 comments
Open

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

K4LCIFER opened this issue Oct 19, 2024 · 2 comments

Comments

@K4LCIFER
Copy link

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:

render_date_time(edit.edit.created),

{render_date_time(edit.edit.created)}": "

using the following function that converts to local time:

ibis/src/frontend/mod.rs

Lines 58 to 63 in 8fa4fb1

fn render_date_time(date_time: DateTime<Utc>) -> String {
date_time
.with_timezone(&Local)
.format("%Y-%m-%d %H:%M:%S")
.to_string()
}

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
Copy link
Owner

Nutomic commented Oct 23, 2024

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants