Usermode/libc - Fix time conversion code
authorJohn Hodge (sonata) <[email protected]>
Fri, 26 Dec 2014 12:03:51 +0000 (20:03 +0800)
committerJohn Hodge (sonata) <[email protected]>
Fri, 26 Dec 2014 12:03:51 +0000 (20:03 +0800)
Usermode/Libraries/libc.so_src/timeconv.c

index 6fed585..00eb13f 100644 (file)
@@ -114,7 +114,7 @@ int64_t get_days_since_y2k(int64_t ts, int *h, int *m, int *s)
        ts -= n_leap;
        #endif
        
        ts -= n_leap;
        #endif
        
-       int64_t days = ts / 24*60*60;
+       int64_t days = ts / (24*60*60);
        int64_t seconds = ts % (24*60*60);
        *s = (is_ls ? 60 : seconds % 60);
        *m = (seconds/60 % 24);
        int64_t seconds = ts % (24*60*60);
        *s = (is_ls ? 60 : seconds % 60);
        *m = (seconds/60 % 24);

UCC git Repository :: git.ucc.asn.au