OSDN Git Service

Use positive time shift for simplicity.
authorrelan <relan@users.noreply.github.com>
Wed, 30 Sep 2009 08:57:33 +0000 (08:57 +0000)
committerrelan <relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:10 +0000 (08:26 +0300)
libexfat/utils.c

index 73bd1de..0539403 100644 (file)
@@ -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;
 }