diff options
| author | Amaury Pouly <pamaury@rockbox.org> | 2011-04-17 01:43:40 +0000 |
|---|---|---|
| committer | Amaury Pouly <pamaury@rockbox.org> | 2011-04-17 01:43:40 +0000 |
| commit | 02118edb997112234798c4f3d3e978659e7a8836 (patch) | |
| tree | a7c1af3533d930a45573aa1564d01c33767996a8 | |
| parent | 709856621a1c95b9017ea5f1d1a44781b729ac93 (diff) | |
| download | rockbox-02118edb997112234798c4f3d3e978659e7a8836.zip rockbox-02118edb997112234798c4f3d3e978659e7a8836.tar.gz rockbox-02118edb997112234798c4f3d3e978659e7a8836.tar.bz2 rockbox-02118edb997112234798c4f3d3e978659e7a8836.tar.xz | |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/utils/sbinfo/sbinfo.c b/utils/sbinfo/sbinfo.c index f09bb79..632c4b3 100644 --- a/utils/sbinfo/sbinfo.c +++ b/utils/sbinfo/sbinfo.c @@ -386,7 +386,8 @@ static void extract(unsigned long filesize) uint64_t micros = sb_header->timestamp; time_t seconds = (micros / (uint64_t)1000000L); - seconds += 946684800; /* 2000/1/1 0:00:00 */ + struct tm tm_base = {0, 0, 0, 1, 0, 100, 0, 0, 1, 0, NULL}; /* 2000/1/1 0:00:00 */ + seconds += mktime(&tm_base); struct tm *time = gmtime(&seconds); color(GREEN); printf(" Creation date/time = "); |