Closed hasezoey closed 1 year ago
Currently the timezone is defined with a Z but given a local time, but this will actually result in the wrong time https://github.com/emabee/flexi_logger/blob/b2447d08550b298a2f356e4ac725e402733f0484/src/deferred_now.rs#L52
Z
for example in my current timezone which is Europe/Berlin (+1h) the following happens:
Europe/Berlin
2023-01-14T16:16:34.000Z
2023-01-14T17:16:34.000Z
2023-01-14T17:16:34.000+01:00
2023-01-14T17:16:34.000+0100
2023-01-14T17:16:34.000000000+01:00
.toISOString
*1 given the time of 2023-01-14T17:16:34.000+01:00 (from using %Z)
%Z
possible fixes:
Currently the timezone is defined with a
Z
but given a local time, but this will actually result in the wrong time https://github.com/emabee/flexi_logger/blob/b2447d08550b298a2f356e4ac725e402733f0484/src/deferred_now.rs#L52for example in my current timezone which is
Europe/Berlin
(+1h) the following happens:2023-01-14T16:16:34.000Z
2023-01-14T17:16:34.000Z
2023-01-14T17:16:34.000+01:00
2023-01-14T17:16:34.000+0100
2023-01-14T17:16:34.000000000+01:00
.toISOString
would output*12023-01-14T16:16:34.000Z
*1 given the time of
2023-01-14T17:16:34.000+01:00
(from using%Z
)possible fixes:
Z
with%Z