/***********************************************************************
* *
* This software is part of the ast package *
* Copyright (c) 1985-2011 AT&T Intellectual Property *
* and is licensed under the *
* Common Public License, Version 1.0 *
* by AT&T Intellectual Property *
* *
* A copy of the License is available at *
* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
* *
* Information and Software Systems Research *
* AT&T Research *
* Florham Park NJ *
* *
* Glenn Fowler <gsf@research.att.com> *
* David Korn <dgk@research.att.com> *
* Phong Vo <kpv@research.att.com> *
* *
***********************************************************************/
#pragma prototyped
/*
* Glenn Fowler
* AT&T Research
*
* Time_t conversion support
*/
#include <tmx.h>
/*
* return Tm_t for t
* time zone and leap seconds accounted for in return value
*/
Tm_t*
{
Time_t x;
int leapsec;
int y;
uint32_t n;
int32_t o;
#if TMX_FLOAT
Time_t z;
uint32_t i;
#endif
leapsec = 0;
{
{
leapsec = 0;
}
}
x = tmxsec(t);
{
else
}
{
x -= o;
o = 0;
}
#if TMX_FLOAT
i = x / (24 * 60 * 60);
z = i;
n = x - z * (24 * 60 * 60);
n /= 60;
n /= 60;
#define x i
#else
x /= 60;
x /= 60;
x /= 24;
#endif
x -= n * 365 + n / 4 - n / 100 + (n + (1900 - 1600)) / 400 - (1970 - 1901) * 365 - (1970 - 1901) / 4;
n += 1900;
{
else
{
}
{
}
}
return tm;
}
/*
* return Tm_t for t
* time zone and leap seconds accounted for in return value
*/
Tm_t*
{
}