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
Check Out this Related Man Page
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
watch your clock!
Unix-time @ 1:58:31 UTC (2:58:31 MEZ) == 1111111111 ;-)
no chance to see such a combination again... 2222222222 will be beyond our time.....
http://en.wikipedia.org/wiki/Unix_time
greetings PRESSY (0 Replies)
Hi
I'm trying to change my sys clock from PST to UTC.
I've read the man date page
it helpfully says :-
-u, --utc, --universal
print or set Coordinated Universal Time
as root I have tried date --universal, date -u, date --utc,
I have checked the /etc/sysinfo/clock file the... (5 Replies)
Hi all,
I am trying to create a file which has one or more ranges based on a file containing a long list. The problem is that the file which has this list is not continuous and is broken in many places. I will try to illustrate by an example:
The List File:
1
2
3
4
5
6
9
10
11
12... (5 Replies)
I have a plain test file with a delimeter ''. In this file some lines are broken into two. The first part of these broken line will have 6 columns and the second part will have 4. These broken lines will be consicutive.
I want to join the two consicutive lines which are having 6 fields and 4... (8 Replies)
Hi all ,
I need to know how to convert a time stamp entered by the user to be converted to GMT/UTC(epoch time) using mktime() and gmtime()
for exapample the input will be put in the form
ptm.tm_sec = 0;
ptm.tm_min = 59;
ptm.tm_hour = 11;
ptm.tm_mday = 20;... (2 Replies)
Hi guys thanks for the help for my previous posts.Now i have a requirement that i download a XMl file which has UTC time stamp.I need to convert UTC time into Unix server timezone.
For ex if the time zone of unix server is CDT then i need to convert into CDT.whatever may be the system time... (5 Replies)