tmxtime.c revision 3f54fd611f536639ec30dd53c48e5ec1897cc7d9
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder/***********************************************************************
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* This software is part of the ast package *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* Copyright (c) 1985-2011 AT&T Intellectual Property *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* and is licensed under the *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* Eclipse Public License, Version 1.0 *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* by AT&T Intellectual Property *
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder* A copy of the License is available at *
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder* http://www.eclipse.org/org/documents/epl-v10.html *
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder* (with md5 checksum b35adb5213ca9657e911e9befb180842) *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* Information and Software Systems Research *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* AT&T Research *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* Florham Park NJ *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder* Glenn Fowler <gsf@research.att.com> *
6b7d53eb1a93b9a9d7e3ce48964128fcd142fe53Christian Maeder* David Korn <dgk@research.att.com> *
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder* Phong Vo <kpv@research.att.com> *
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder***********************************************************************/
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder * Glenn Fowler
2083784cdbe448a3d8f94c7a0a0a011bbabf3fd0Christian Maeder * AT&T Research
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder * Time_t conversion support
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder * convert Tm_t to Time_t
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder * if west==TM_LOCALZONE then the local timezone is used
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder * otherwise west is the number of minutes west
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder * of GMT with DST taken into account
4ea69d9a971bbb8b4082bcd60350fdabd5411c23Christian Maeder * this routine works with a copy of Tm_t to avoid clashes
5334aa8fe0b0d1eb8a1cad40b741aa07172773c9Christian Maeder * with other tm*() that may return static Tm_t*
register int32_t y;
int sec;
return TMX_NOTIME;
t = y * 365 + y / 4 - y / 100 + (y + (1900 - 1600)) / 400 - (1970 - 1901) * 365 - (1970 - 1901) / 4;
return TMX_NOTIME;
return TMX_NOTIME;