![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| epoch time in shell script | robsonde | SUN Solaris | 14 | 05-12-2009 01:08 PM |
| epoch time | ali560045 | Shell Programming and Scripting | 3 | 06-02-2008 05:41 AM |
| EPOCH to real time? | TheEngineer | UNIX for Advanced & Expert Users | 5 | 07-18-2006 09:30 AM |
| Epoch time | 12yearold | UNIX for Advanced & Expert Users | 2 | 07-14-2006 04:11 PM |
| how to convert epoch time to readible format? | cin2000 | Shell Programming and Scripting | 11 | 12-19-2005 07:14 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 subtraction to get the real time results in seconds and minutes... Appreciate some light here... thanks ![]() |
|
||||
|
epoch time (for UNIX) is given as the number of seconds elapsed since 00:00:00 January 1, 1970. It can be converted to all kinds of formats.
Show us one of your data items. To answer your question - if they are in a format that looks like this: 1152692657 then they are in the primary format. Subtract first, then convert. Otherwise, convert to seconds elapsed since Jan 1 1970, then subtract, then convert back to elapsed time. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|