From 5633b61bc7d2f4b67bdd1bad56cf5417b20a01bc Mon Sep 17 00:00:00 2001 From: Skia Date: Sat, 2 May 2015 18:27:29 +0200 Subject: [PATCH] pf: Fix time format to GMT (not local anymore) --- libr/util/p_format.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libr/util/p_format.c b/libr/util/p_format.c index 65baa39a73..b3a0df2b3d 100644 --- a/libr/util/p_format.c +++ b/libr/util/p_format.c @@ -300,7 +300,7 @@ static void r_print_format_time(const RPrint* p, int endian, int mode, if (MUSTSET) { p->printf ("wv4 %s @ 0x%08"PFMT64x"\n", setval, seeki+((elem>=0)?elem*4:0)); } else if (MUSTSEE) { - char *timestr = strdup(ctime((time_t*)&addr)); + char *timestr = strdup(asctime (gmtime ((time_t*)&addr))); *(timestr+24) = '\0'; p->printf ("0x%08"PFMT64x" = ", seeki+((elem>=0)?elem*4:0)); if (size==-1) { @@ -310,7 +310,7 @@ static void r_print_format_time(const RPrint* p, int endian, int mode, while (size--) { updateAddr (buf, i, endian, &addr, NULL); free (timestr); - timestr = strdup (ctime((time_t*)&addr)); + timestr = strdup (asctime (gmtime ((time_t*)&addr))); *(timestr+24) = '\0'; if (elem == -1 || elem == 0) { p->printf ("%s", timestr); @@ -325,7 +325,7 @@ static void r_print_format_time(const RPrint* p, int endian, int mode, } free (timestr); } else if (MUSTSEEJSON) { - char *timestr = strdup (ctime ((time_t*)&addr)); + char *timestr = strdup (asctime (gmtime ((time_t*)&addr))); *(timestr+24) = '\0'; if (size==-1) { p->printf ("\"%s\"", timestr); @@ -334,7 +334,7 @@ static void r_print_format_time(const RPrint* p, int endian, int mode, while (size--) { updateAddr (buf, i, endian, &addr, NULL); free (timestr); - timestr = strdup (ctime((time_t*)&addr)); + timestr = strdup (asctime (gmtime ((time_t*)&addr))); *(timestr+24) = '\0'; if (elem == -1 || elem == 0) { p->printf ("\"%s\"", timestr);