Sponsored Content
Full Discussion: EPOCH to real time?
Top Forums UNIX for Advanced & Expert Users EPOCH to real time? Post 302080049 by TheEngineer on Saturday 15th of July 2006 03:32:45 AM
Old 07-15-2006
EPOCH to real time?

hi all Smilie

i am wondering if there is a way to convert from EPOCH time to the standard tim, may be using a script or some thing else???????


thanks............................
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Epoch time

Guys, i have a question... I have 2 sets of data say "a" and "a+1" which has values in epoch time.. Question is... if i were to get the time difference where diff = "a+1" - "a" can i convert it back to real time duration after the subtraction... OR i need to convert em first before i do the... (1 Reply)
Discussion started by: 12yearold
1 Replies

2. UNIX for Advanced & Expert Users

Epoch time

Guys, i have a question... I have 2 sets of data say "a" and "a+1" which has values in epoch time.. Question is... if i were to get the time difference where diff = "a+1" - "a" can i convert it back to real time duration after the subtraction... OR i need to convert em first before i do the... (2 Replies)
Discussion started by: 12yearold
2 Replies

3. Shell Programming and Scripting

epoch time

Hi, i need to convert below date/time format into epoch time YYYY-m-d H:M below the example: a=`date +"%F %H:%M"` echo $a Convert $a to epoch time ------------------------------------------------------------------------ lets take an example if $a=1.03 here i want the epoch time... (3 Replies)
Discussion started by: ali560045
3 Replies

4. Shell Programming and Scripting

Convert Epoch Time to Standard Date and Time & Vice Versa

Hi guys, I know that this topic has been discuss numerous times, and I have search the net and this forum for it. However, non able to address the problem I faced so far. I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies

5. Shell Programming and Scripting

how to convert date time to epoch time in solaris

Hi, Is there any easy way to convert date time(stored in shell variable ) to epoch time in solaris box? As +%s is working on linux but not on solaris, also -d option is not working. Any suggestion please? (6 Replies)
Discussion started by: anshuman0507
6 Replies

6. Shell Programming and Scripting

Shell script to convert epoch time to real time

Dear experts, I have an epoch time input file such as : - 1302451209564 1302483698948 1302485231072 1302490805383 1302519244700 1302492787481 1302505299145 1302506557022 1302532112140 1302501033105 1302511536485 1302512669550 I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies

7. Shell Programming and Scripting

Converting real time to epoch time

# date +%s -d "Mon Feb 11 02:26:04" 1360567564 # perl -e 'print scalar localtime(1360567564), "\n";' Mon Feb 11 02:26:04 2013 the epoch conversion is working fine. but one of my application needs 13 digit epoch time as input 1359453135154 rather than 10 digit epoch time 1360567564... (3 Replies)
Discussion started by: vivek d r
3 Replies

8. Shell Programming and Scripting

Awk: time intervals based on epoch time

I have a list of epoch times delimited by "-" as follows: 1335078000 - 1335176700 1335340800 - 1335527400 1335771300 - 1335945600 1336201200 - 1336218000 The corresponding dates are: 20120422 1000 - 20120423 1325 20120425 1100 - 20120427 1450 20120430 1035 - 20120502 1100 ... (3 Replies)
Discussion started by: alex2005
3 Replies
TIMER_SETTIME(2)					      BSD System Calls Manual						  TIMER_SETTIME(2)

NAME
timer_settime, timer_gettime, timer_getoverrun -- process timer manipulation LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <time.h> int timer_settime(timer_t timerid, int flags, const struct itimerspec * restrict tim, struct itimerspec * restrict otim); int timer_gettime(timer_t timerid, struct itimerspec *tim); int timer_getoverrun(timer_t timerid); DESCRIPTION
The timer_settime() sets the next expiration time of the timer with ID timerid to the it_value (see itimerspec(3)) specified in the tim argu- ment. If the value is 0, the timer is disarmed. If the argument otim is not NULL the old timer settingas are returned. If the flags argument is set to TIMER_RELTIME then the expiration time is set to the value in nanoseconds specified in the tim argument from the time the call to timer_settime() was made. If the flags argument is set to TIMER_ABSTIME then the expiration time is set to be equal to the difference between the clock associated with this timer, and the value specified in the tim argument. If that time has already passed, then the call succeeds, and the expiration notification occurs. If the it_interval of the tim argument is non-zero, then the timer reloads upon expiration. The timer_gettime() function returns the current settings of the timer specified by the timerid argument in the tim argument. Only one notification event (signal) can be pending for a given timer and process. If a timer expires while the signal is still queued for delivery, then the overrun counter for that timer is increased. The counter can store values up to DELAYTIMER_MAX. When the signal is finally delivered to the process, then the timer_getoverrun() function can be used to retrieve the overrun counter for the timer specified in the timerid argument. NOTES
Expiration time values are always rounded up to the resolution of the timer, so a notification will never be sent before the requested time. Values returned in the otim argument of timer_settime() or in the tim argment of timer_gettime() are subject to the above rounding effect and might not exactly match the requested values by the user. RETURN VALUES
If successful, the timer_gettime() and timer_settime() functions return 0, and the timer_getoverrun() function returns the expiration overrun count for the specified timer. Otherwise, the functions return -1, and set errno to indicate the error. ERRORS
The timer_gettime(), timer_getoverrun(), and timer_settime() functions will fail if: [EINVAL] The argument timerid does not correspond to a valid timer id as returned by timer_create() or that timer id has been deleted by timer_delete(). The timer_settime() function will fail if: [EINVAL] A nanosecond field in the tim structure specified a value less than zero or greater than or equal to 10e9. SEE ALSO
clock_gettime(2), timer_create(2), timer_delete(2) STANDARDS
IEEE Std 1003.1b-1993 (``POSIX.1''), IEEE Std 1003.1i-1995 (``POSIX.1'') BSD
May 17, 2010 BSD
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy