Skip to content

Commit 9df43a0

Browse files
author
itagaki.takahiro
committed
Yet another fixes for DST.
git-svn-id: http://pg-rman.googlecode.com/svn/trunk@35 182aca00-e38e-11de-a668-6fd11605f5ce
1 parent 5933d52 commit 9df43a0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

dir.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ dir_read_file_list(const char *root, const char *file_txt)
459459
struct tm tm;
460460
pgFile *file;
461461

462+
memset(&tm, 0, sizeof(tm));
462463
if (sscanf(buf, "%s %c %lu %u %o %d-%d-%d %d:%d:%d",
463464
path, &type, &write_size, &crc, &mode,
464465
&tm.tm_year, &tm.tm_mon, &tm.tm_mday,
@@ -472,6 +473,7 @@ dir_read_file_list(const char *root, const char *file_txt)
472473
elog(ERROR_CORRUPTED, _("invalid type '%c' found in \"%s\""),
473474
type, file_txt);
474475
}
476+
tm.tm_isdst = -1;
475477

476478
file = (pgFile *) pgut_malloc(offsetof(pgFile, path) +
477479
(root ? strlen(root) + 1 : 0) + strlen(path) + 1);

pg_rman.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ parse_range(pgBackupRange *range, const char *arg1, const char *arg2)
248248
if (arg2 != NULL)
249249
remove_not_digit(tmp + strlen(tmp), len - strlen(tmp), arg2);
250250

251+
memset(&tm, 0, sizeof(tm));
251252
tm.tm_year = 0; /* tm_year is year - 1900 */
252253
tm.tm_mon = 0; /* tm_mon is 0 - 11 */
253254
tm.tm_mday = 1; /* tm_mday is 1 - 31 */
@@ -267,6 +268,7 @@ parse_range(pgBackupRange *range, const char *arg1, const char *arg2)
267268
tm.tm_year -= 1900;
268269
if (num > 1)
269270
tm.tm_mon -= 1;
271+
tm.tm_isdst = -1;
270272
range->begin = mktime(&tm);
271273

272274
switch (num)

0 commit comments

Comments
 (0)