You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Use localtime() to format time_t in cvtTimeToZ().
Using gmtime() produced output skewed by the local timezone. Since this function is currently only used for debug logging this is not a live bug in the field.
This commit is contained in:
@@ -395,7 +395,7 @@ cvtTimeToZ(time_t value, char *buffer, size_t bufferSize)
|
||||
|
||||
ASSERT(buffer != NULL);
|
||||
|
||||
size_t result = strftime(buffer, bufferSize, "%s", gmtime(&value));
|
||||
size_t result = strftime(buffer, bufferSize, "%s", localtime(&value));
|
||||
|
||||
if (result == 0)
|
||||
THROW(AssertError, "buffer overflow");
|
||||
|
||||
Reference in New Issue
Block a user