-
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
[CT-662] [Feature] Allow the configuration of the timezone for timestamps in event logging #5267
Comments
This sounds like a reasonable request. We're going to be looking at logging updates later in this quarter. I'm not sure if it would get onto the schedule or not, but we can take a look. |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest; add a comment to notify the maintainers. |
Reopening because we just got a duplicate opened in #6319
|
can i add an option that set zonetime in dbt-core project configuration file? |
sorry spelling error above should be timezone |
Yes, a project level setting would be cool to set the timezone by name. |
Please! I see timestamps in log in UTC and its annoying =( |
Atleast change in logger.py |
Adding my vote in favor of this issue |
Putting aside, for the moment, the question of creating a standalone configuration for this — I'd be supportive of switching from Timestamp Doug (@dbeatty10) - does that proposed switch give you any trepidation? |
Main trepidationFor both ConsequencesWith the current dbt log output standardized to UTC, it's still comparable to other dbt logs (as long as you know it's UTC). But most human beings think about time in their local time zone. When logs from dbt (or other systems) use naive timestamps that are localized, then comparing them really becomes quite the forensic exercise 😰 Possible solutionA possible solution is to use aware $ dbt run
07:42:18-06:00 Running with dbt=1.4.4
Python examplesfrom datetime import timezone, datetime as dt
|
Just having it log in the system's timezone would be great. I'm lucky enough to be at UTC+10 so it is only mildly annoying, but still strange that it would be that way. I've created this workaround, which also adds an elapsed time to the output. Someone might find it useful. 😉 |
I'd propose two new configurations to handle this use case:
*I didn't put a ton of thought into the names, so they could be shorted during design refinement as-needed. For example, maybe
|
I'd also really like to see two options (local system time versus UTC) rather than always defaulting to UTC only. |
As somebody find solution for this? is a problem from python or dbt himself? |
@PORXavierM the timestamps are coming from the logging of There is some of amount of configurability of the timestamps via the
There's some more nitty-gritty code details discussed here. |
Is this your first time opening an issue?
Describe the Feature
Currently the timestamp in event logging is always output in utc.
It would be helpful to be able to set the time zone via a configuration or parameter (either local or any other time zone).
Describe alternatives you've considered
I have not found any alternatives. One has to live with utc.
Who will this benefit?
This would make it easier to evaluate the logs and help to avoid confusion.
Additionally the evaluation of dbt logs in combination with other logs using lokal or any other timezone would be easier.
Are you interested in contributing this feature?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: