offtime(), offtime_r(), timeoff(), timegm(), timelocal()

BSD Misc date and time conversions 

Function


SYNOPSIS

#include <time.h>

struct tm *offtime(const time_t *clock, long int offset);

struct tm *offtime_r(const time_t *clock, long int offset, struct tm *ret);

time_t timeoff(struct tm *tm, long int offset);

time_t timegm(struct tm *tm);

time_t timelocal(struct tm *tm);


DESCRIPTION

These functions are inspired by C standard interfaces named similarly.

offtime() converts the calendar time clock, offset by offset seconds, into broken-down time, expressed as Coordinated Universal Time (UTC).

offtime_r() is similar to offtime() but it places the returned struct tm * in the user supplied ret argument.

timeoff() converts the broken-down time tm, expressed as UTC, offset by offset seconds, into a calendar time value.

timegm() converts the broken-down time tm into a calendar time value, effectively being the inverse of gmtime(). It is equivalent to the "C" standard function mktime() operating in UTC.

timelocal()converts the broken down time tm, expressed as local time, into a calendar time value. It is equivalent to the "C" standard function mktime(), and is provided for symmetry only.


CONFORMANCE

BSD UNIX


MULTITHREAD SAFETY LEVEL

offtime_r() - MT Safe.

offtime(), timeoff(), timegm(), timelocal() - Not MT Safe.


PORTING ISSUES

Likely will only port to BSD UNIX environments.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
ctime(), tzset()


PTC MKS Toolkit 10.3 Documentation Build 39.