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

Function: gpstime()

0 struct tm *gpstime(const time_t *tp)

This is a ``convenience" function which returns the same quantity as the previous function utctime() but takes as its argument the GPS time, which is the number of seconds after Jan 6, 1980 00:00:00 UTC. The value returned by this function are exactly the same as for the Unix standard C library function gmtime(). Thus asctime(utctime(*tp)) is an ascii string showing the UTC time.

tp: Input. Pointer to an object of type time_t which is the number of seconds after Jan 6, 1980 00:00:00 UTC.
The function returns a pointer to a struct tm structure. It 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 calls utctime(), so please see the comments for utctime().



Bruce Allen 2000-11-19