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*
|
Tm*
|
||||||
p9gmtime(long t)
|
p9gmtime(long x)
|
||||||
{
|
{
|
||||||
|
time_t t;
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
|
|
||||||
|
t = (time_t)x;
|
||||||
tm = *gmtime(&t);
|
tm = *gmtime(&t);
|
||||||
tm2Tm(&tm, &bigtm);
|
tm2Tm(&tm, &bigtm);
|
||||||
return &bigtm;
|
return &bigtm;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tm*
|
Tm*
|
||||||
p9localtime(long t)
|
p9localtime(long x)
|
||||||
{
|
{
|
||||||
|
time_t t;
|
||||||
struct tm tm;
|
struct tm tm;
|
||||||
|
|
||||||
|
t = (time_t)x;
|
||||||
tm = *localtime(&t);
|
tm = *localtime(&t);
|
||||||
tm2Tm(&tm, &bigtm);
|
tm2Tm(&tm, &bigtm);
|
||||||
return &bigtm;
|
return &bigtm;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue