mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
Appease the time_t monster.
This commit is contained in:
parent
c2070b2fc9
commit
829e822386
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue