Skip to content

Conversation

pscheid92
Copy link
Contributor

Closes issue #483

Before:
We use time.Parse which defaults to TZ UTC if there is no time zone indicator specified in the time layout string. During the reparsing in ConsoleWriter we therefore added the TZ difference to UTC twice.

After:
We use time.ParseInLocal where we need to provide a dedicated fallback TZ as a fallback. Since we now fallback to the local TZ, we don't add the TZ difference to UTC twice.

Closes issue #483

Before:
We use time.Parse which defaults to TZ UTC if there is no time zone
indicator specified in the time layout string. During the reparsing in
ConsoleWriter we therefore added the TZ difference to UTC twice.

After:
We use time.ParseInLocal where we need to provide a dedicated fallback
TZ as a fallback. Since we now fallback to the local TZ, we don't add
the TZ difference to UTC twice.
@rs rs merged commit a9a8199 into rs:master Oct 21, 2022
pablitoc pushed a commit to nxcr-org/zerolog that referenced this pull request Apr 7, 2023
…s#497)

Closes issue rs#483

Before:
We use time.Parse which defaults to TZ UTC if there is no time zone
indicator specified in the time layout string. During the reparsing in
ConsoleWriter we therefore added the TZ difference to UTC twice.

After:
We use time.ParseInLocal where we need to provide a dedicated fallback
TZ as a fallback. Since we now fallback to the local TZ, we don't add
the TZ difference to UTC twice.
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

Successfully merging this pull request may close these issues.

2 participants