-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Log::Entry
timestamp uses Time.local
#9589
Comments
I don't think so. If I develop an app in the US I'll consume the logs in the US. Maybe there are remote workers, they'll have to translate the time. But I'd say that's the exception, not the norm. Local times are always more intuitive. |
Right, but if you have servers on east and west coast, looking at the logs in the console you would have interleaved logs with different times, even tho they happened at the same time. If anything, IMO, it would make more sense to have the source of truth (the |
Yes, but if you have servers on east and west coast, then everyone will have to translate from UTC to their time. So if at least a chunk of the team gets local time I think it's better. |
I don't think so...? The app will only run in one machine with one local time. |
It would if you have two machines, one on each coast, running two instances of the same application. Such as for regional load balancing; since each sever would be reporting its own local time. IMO the mental overhead of converting from a standardized time to your local time is much less than converting from some arbitrary local time into your local time. Also lets not forget that this isn't scoped solely to |
I think it makes sense. Maybe it depends on the log backend. If the log understands timezones (I think it should) they it could present entries in the user's timezone. I'll let others comment on this because I ran out of ideas :-) |
If the machine's local time is set to UTC, would |
Yeah, I guess that makes sense. If you want your logs in UTC, you could set local timezone to UTC. That would obviously affect all other parts of the application as well. But I suppose if you have an application running in different time zones, you would need to have some dedicated mechanism for presenting time in a user's local time zone. Also, |
Can this at least be configurable? |
I don't think there needs to be explicit configuration for this. You can configure |
I think we can move the default value to a class method. That way it can be overridden easily for the whole app. |
Yes, I guess my thinking was that the more common option would be |
@Blacksmoke16 Yeah, that should also work. It's either one or the other. IMO |
Does it make sense for the timestamp to not be
UTC
? I would thinkUTC
would make more sense, especially when trying to consume the logs generated by two applications in two different regions.Originally posted by @Blacksmoke16 in #9570 (comment)
The text was updated successfully, but these errors were encountered: