diff options
-rw-r--r-- | src/lib9/date.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib9/date.c b/src/lib9/date.c index 58a4a889..cc97f2ea 100644 --- a/src/lib9/date.c +++ b/src/lib9/date.c @@ -68,20 +68,24 @@ Tm2tm(Tm *bigtm, struct tm *tm) } Tm* -p9gmtime(long t) +p9gmtime(long x) { + time_t t; struct tm tm; + t = (time_t)x; tm = *gmtime(&t); tm2Tm(&tm, &bigtm); return &bigtm; } Tm* -p9localtime(long t) +p9localtime(long x) { + time_t t; struct tm tm; + t = (time_t)x; tm = *localtime(&t); tm2Tm(&tm, &bigtm); return &bigtm; |