X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=basket.c;h=5d20c66b39b02a9f3d94b6b97a7da13c3937ec69;hb=refs%2Ftags%2F5.1-14;hp=487072bf798dd3b75fb5e1d57a7d984ae883dedc;hpb=d946a30d5eabd2dd3b5574fc818bb1740e5827bf;p=debian%2Fgcpegg diff --git a/basket.c b/basket.c index 487072b..5d20c66 100644 --- a/basket.c +++ b/basket.c @@ -91,6 +91,7 @@ static void updateHTML(void) int i; static uint32 lastHtml = 0; uint32 now = getzulutime(NULL); + time_t now_val; char udate[256], ustime[256]; static char timeFormat[] = "%Y-%m-%d %T"; @@ -114,9 +115,11 @@ static void updateHTML(void) htmlFile[0] = 0; /* Suppress further updates */ return; } - - strftime(udate, sizeof udate, timeFormat, gmtime((time_t *) &now)); - strftime(ustime, sizeof ustime, timeFormat, gmtime((time_t *) &upsince)); + + now_val = now; + strftime(udate, sizeof udate, timeFormat, gmtime(&now_val)); + time_t upsince_val = upsince; + strftime(ustime, sizeof ustime, timeFormat, gmtime(&upsince_val)); fprintf(hf, "\ \n\ @@ -147,8 +150,10 @@ static void updateHTML(void) strcpy(udate, "