11.2 Overview of Date/Time Functions

In the UTC-based model, times are represented as seconds since the Epoch. The Epoch is defined as the time 0 hours, 0 minutes, 0 seconds, January 1, 1970 UTC. Seconds since the Epoch is a value interpreted as the number of seconds between a specified time and the Epoch.

The functions time and ftime return the time as seconds since the Epoch.

The functions ctime, gmtime, and localtime take as their argument a time value that represents the time in seconds from the Epoch.

The function mktime converts a broken-down time, expressed as local time, into a time value in terms of seconds since the Epoch.

The values st_ctime, st_atime, and st_mtime returned in the stat structure by the stat and fstat functions are also in terms of UTC.

Time support new to OpenVMS Version 7.0 includes the functions tzset, gettimeofday, and getclock, and the external variables tzname, timezone and daylight.

The UTC-based time model enables the DEC C RTL to:


Previous Page | Next Page | Table of Contents | Index