Unix and Linux Discussions Tagged with broken |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
15 |
67,239 |
Solaris |
|
|
|
3 |
2,661 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
5,028 |
Shell Programming and Scripting |
|
|
|
4 |
1,909 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,170 |
UNIX for Advanced & Expert Users |
|
|
|
1 |
13,014 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
2,825 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,024 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
3,136 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
7,418 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
4,267 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
4,804 |
Programming |
|
|
|
1 |
6,971 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
3,107 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
2,588 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
8,215 |
UNIX for Dummies Questions & Answers |
OFFTIME(3) BSD Library Functions Manual OFFTIME(3)
NAME
offtime, timeoff, timegm, timelocal -- convert date and time
LIBRARY
Standard C Library (libc, -lc)
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(3). It is equivalent to the C
standard function mktime(3) 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 func-
tion mktime(3), and is provided for symmetry only.
SEE ALSO
ctime(3), tm(3), tzset(3)
BSD
April 14, 2011 BSD