diff options
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c index fa692a0..c25ebe1 100644 --- a/src/utils.c +++ b/src/utils.c @@ -38,6 +38,8 @@ #include "common.h" #include "libimobiledevice-glue/utils.h" +#define MAC_EPOCH 978307200 + #ifndef HAVE_STPCPY #undef stpcpy char *stpcpy(char *s1, const char *s2); @@ -496,7 +498,7 @@ static void plist_node_print_to_stream(plist_t node, int* indent_level, FILE* st case PLIST_DATE: plist_get_date_val(node, (int32_t*)&tv.tv_sec, (int32_t*)&tv.tv_usec); { - time_t ti = (time_t)tv.tv_sec; + time_t ti = (time_t)tv.tv_sec + MAC_EPOCH; struct tm *btime = localtime(&ti); if (btime) { s = (char*)malloc(24); |