1
0
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:
David Steele
2019-12-11 21:51:32 -05:00
parent 811ecd758d
commit db5175915a
+1 -1
View File
@@ -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");