summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmaury Pouly <pamaury@rockbox.org>2011-04-17 01:43:40 +0000
committerAmaury Pouly <pamaury@rockbox.org>2011-04-17 01:43:40 +0000
commit02118edb997112234798c4f3d3e978659e7a8836 (patch)
treea7c1af3533d930a45573aa1564d01c33767996a8
parent709856621a1c95b9017ea5f1d1a44781b729ac93 (diff)
downloadrockbox-02118edb997112234798c4f3d3e978659e7a8836.tar.gz
rockbox-02118edb997112234798c4f3d3e978659e7a8836.zip
sbinfo: make the time calculation clearer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29732 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/sbinfo/sbinfo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/sbinfo/sbinfo.c b/utils/sbinfo/sbinfo.c
index f09bb79fe9..632c4b3eb9 100644
--- a/utils/sbinfo/sbinfo.c
+++ b/utils/sbinfo/sbinfo.c
@@ -386,7 +386,8 @@ static void extract(unsigned long filesize)
386 386
387 uint64_t micros = sb_header->timestamp; 387 uint64_t micros = sb_header->timestamp;
388 time_t seconds = (micros / (uint64_t)1000000L); 388 time_t seconds = (micros / (uint64_t)1000000L);
389 seconds += 946684800; /* 2000/1/1 0:00:00 */ 389 struct tm tm_base = {0, 0, 0, 1, 0, 100, 0, 0, 1, 0, NULL}; /* 2000/1/1 0:00:00 */
390 seconds += mktime(&tm_base);
390 struct tm *time = gmtime(&seconds); 391 struct tm *time = gmtime(&seconds);
391 color(GREEN); 392 color(GREEN);
392 printf(" Creation date/time = "); 393 printf(" Creation date/time = ");