From 87c8e28166f95ea1231ad94708a975a8803b0ef8 Mon Sep 17 00:00:00 2001 From: relan Date: Wed, 30 Sep 2009 08:57:33 +0000 Subject: [PATCH] Use positive time shift for simplicity. --- libexfat/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexfat/utils.c b/libexfat/utils.c index 73bd1de..0539403 100644 --- a/libexfat/utils.c +++ b/libexfat/utils.c @@ -137,7 +137,7 @@ static time_t get_time_shift(void) if (gettimeofday(&tv, &tz) != 0) return 0; - return -tz.tz_minuteswest * SEC_IN_MIN; + return tz.tz_minuteswest * SEC_IN_MIN; } time_t exfat_exfat2unix(le16_t date, le16_t time) @@ -182,7 +182,7 @@ time_t exfat_exfat2unix(le16_t date, le16_t time) unix_time += etime.twosec * 2; /* exFAT stores timestamps in local time, so we correct it to UTC */ - unix_time -= get_time_shift(); + unix_time += get_time_shift(); return unix_time; } -- 2.11.0