Converts the formats of date and time representations.
Standard C Library (libc.a)
#include <time.h>
char *ctime64 (Clock)
const time64_t *Clock;
struct tm *localtime64 (Clock)
const time64_t *Clock;
struct tm *gmtime64 (Clock)
const time64_t *Clock;
time64_t mktime64(Timeptr)
struct tm *Timeptr;
double difftime64(Time1, Time0)
time64_t Time0, Time1;
char *asctime64 (Tm)
const struct tm *Tm;
The ctime64 subroutine converts a time value pointed to by the Clock parameter, which represents the time in seconds since 00:00:00 Coordinated Universal Time (UTC), January 1, 1970, into a 26-character string in the following form:
Sun Sept 16 01:03:52 1973\n\0
The width of each field is always the same as shown here.
The ctime64 subroutine adjusts for the time zone and daylight saving time, if it is in effect.
The localtime64 subroutine converts the 64 bit long pointed to by the Clock parameter, which contains the time in seconds since 00:00:00 UTC, 1 January 1970, into a tm structure. The localtime64 subroutine adjusts for the time zone and for daylight saving time, if it is in effect. Use the time-zone information as though localtime64 called tzset.
Item | Description |
---|---|
0 | Initially presumes that Daylight Savings Time (DST) is not in effect. |
>0 | Initially presumes that DST is in effect. |
-1 | Actively determines whether DST is in effect from the specified time and the local time zone. Local time zone information is set by the tzset subroutine. |
Item | Description |
---|---|
Clock | Specifies the pointer to the time value in seconds. |
Timeptr | Specifies the pointer to a tm structure. |
Time1 | Specifies the pointer to a time64_t structure. |
Time0 | Specifies the pointer to a time64_t structure. |
Tm | Specifies the pointer to a tm structure. |
The mktime64 subroutine returns the specified time in seconds encoded as a value of type time64_t. If the time cannot be represented, the function returns the value (time64_t)-1.
The localtime64 and gmtime64 subroutines return a pointer to the tm struct .
The ctime64 and asctime64 subroutines return a pointer to a 26-character string.
The difftime64 subroutine returns the difference expressed in seconds as a value of type long double.