DiffElapsed time between unix timestamps help needed...


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers DiffElapsed time between unix timestamps help needed...
# 1  
Old 12-12-2001
Question DiffElapsed time between unix timestamps help needed...

Does anyone know a perl script/utility/etc. to calculate the time in seconds between two unix time stamps?

Any help will be appreciated.

-bozzhawg
# 2  
Old 12-12-2001
You have several options...

Take a look at a sample script at...
http://www.peak.org/~regan/perl/exam...ettime.pl.html

Also, you can use the Perl time modules bundle
which contains... Time::CTime,
Time::JulianDay, Time::ParseDate, Time::Timezone,
and Time:SmilieaysInMonth

See...
http://www.perl.com/pub/r/771
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Arduino UNIX Time - Syncing Computer UNIX Time to Arduino Time with Python

Just finished a quick Python script to send the current unix time over to the Arduino from macOS, so in the absence of GPS or some other way to get the unix timestamp (epoch time) to the Arduino, I can get my macOS and Arduino UNO synced to within a second. Normally, when the Arduino starts... (9 Replies)
Discussion started by: Neo
9 Replies

2. Shell Programming and Scripting

Compare two timestamps and print elapsed time

Hi, I am unable to Difference between two time stamps in Linux and display the total elapsed time . Source date: Aug 15, 2012 02:00:03 Target date: Aug 14, 2012 18:00:03 # based on the forums I am using the below function. Converted dates into this format Src_dt=20120814180003... (7 Replies)
Discussion started by: onesuri
7 Replies

3. Shell Programming and Scripting

Calculating time windows from logfile timestamps

Hey all. I am working on some scripts in bash to perform a variety of functions; there are a variety of steps involved, and they must happen in a specific sequence; what I need help with is a way to calculate some differences in a timestamp in a logfile. One of the steps in the scripts I am... (3 Replies)
Discussion started by: danowar
3 Replies

4. UNIX for Dummies Questions & Answers

Help needed for nohup time

Hi All, Firstly thanks for reading my query..I am a complete newbie in Unix and I recently read about nohup command which is responsible to continue execution in background. But I have found some command where time is used alongwith nohup as given below:- nohup time A.sh & I don't know why... (2 Replies)
Discussion started by: saswati16
2 Replies

5. Shell Programming and Scripting

Help needed with elapsed time from text values

I'm extracting two time & date values from a log file, and I need a way to calculate the elapsed time between the two. The values are in this format: Feb 12 10:53:15 Feb 12 10:59:57 The difference is 6 minutes and 42 seconds Does anyone know if there is a way to do this? I've seen lots of... (4 Replies)
Discussion started by: peterv6
4 Replies

6. AIX

How to find time difference between 2 timestamps?

HI All, can some one please help me how to fine the difference between two time stamps say a= Nov 10, 2009 9:21:25 AM b= Nov 10, 2009 10:21:25 AM I want to find difference between the a & b I googled and tried with some options but no luck. My OS is AIX (1 Reply)
Discussion started by: bandlan9
1 Replies

7. HP-UX

Time Zone Change Needed

Need help with a timezone change for my user profile on HPUX, from UTC to PDT8PST pgop:/home/pgop > date Thu Sep 25 15:09:50 UTC 2008 to Thu Sep 25 08:12:44 PDT 2008 Tried looking through manuals for date over this to no luck!! :confused: (3 Replies)
Discussion started by: pgop
3 Replies

8. UNIX for Dummies Questions & Answers

Unix timestamps

Can someone help me with a Unix or perl script to convert the unix timestamps to human readable format? Any help will be highly appreciated... (3 Replies)
Discussion started by: hamsasal
3 Replies

9. UNIX for Advanced & Expert Users

Caluculate time between 2 unix timestamps?

Does anyone know a perl script/utility/etc. to calculate the time in seconds between two unix time stamps? Any help will be appreciated. -bozzhawg (1 Reply)
Discussion started by: bozzhawg
1 Replies
Login or Register to Ask a Question