next up previous contents
Next: Function: gpstime() Up: Time Standards: UTC, GPS, Previous: Time Standards: UTC, GPS,   Contents

Function: utctime()

0 struct tm *utctime(const time_t *tp)

This is a ``convenience" function which will will do what the standard Unix C library function gmtime() is supposed to do, but fails to do. That is, it prints out the UTC time. The arguments and value returned by this function are exactly the same as for the Unix standard C library function gmtime().

tp: Input. Pointer to an object of type time_t which is the number of seconds after Jan 1, 1970 00:00:00 UTC.
The function returns a pointer to a struct tm structure. Thus asctime(utctime(*tp)) is an ascii string showing the UTC time tp. This function will warn the user if the tp argument is before or after the range of validity of the function.
Author: Bruce Allen (ballen@dirac.phys.uwm.edu).
Comments: This function contains a table of all known leap seconds. It will need to be revised when the next leap second after Dec 31, 1998 is added. Note that if there is a negative leap second the coding will need to be modified. If it is a positive leap second then one additional entry needs to be made to an internal table.


next up previous contents
Next: Function: gpstime() Up: Time Standards: UTC, GPS, Previous: Time Standards: UTC, GPS,   Contents
Bruce Allen 2000-11-19