Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Need to get 4 Hrs back time and compare with successive time Post 302214960 by maanik85 on Tuesday 15th of July 2008 08:25:29 AM
Old 07-15-2008
Need to get 4 Hrs back time and compare with successive time

Hi all,

I am working on a script in which i need to get 4 hrs back time from the current time which i got from this perl function :

`perl -e 'print localtime(time() - 14400) . "\n"'`

now i need to get this in a loop and increment that time by 15 minutes
i.e
i=900(=15minutes)
`perl -e 'print localtime(time() - 14400+$i) . "\n"'`
I do not know perl much and the above code does not work . i have to compare time from a table column from a database which has a listing afer every 15 minutes . so basically i hv to get a loop in which i can use this function and compare the time which is exactly after every 15 minutes. there is a new lisitng in the Db after every 15 minutes and i need to check the time gap.

How can I compare time from this perl function or if there is any other script it will be really appreciated .

Thanks,
Manik
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Rolling back time

Hi all, Have a small problem. Back in October the pervious sys-admin (of a client's company) made the necessary adjustments to the system clock for daylight savings (Sydney time - +11 GMT). As far as I can gather, they just amended the time - NO TIMEZONE !?! Is there an effective and safe... (5 Replies)
Discussion started by: Cameron
5 Replies

2. SuSE

Time resetting to 00 HRS on starting

I Have a SUSE Linux Enterprise server 9.0. When I start the server , using date command I daily find that the time it is showing is 00.00 Hrs. It shows the date correctly. Every day I have to set the time using the date command. I am facing this proble from last 3 weeks but couldn't find a... (4 Replies)
Discussion started by: V.V.KUMAR
4 Replies

3. Shell Programming and Scripting

Compare Last Modified Time across Time Zone

Hi, I'm new to shell script programming, I only have Java programming background. I'm writing a shell script to do file synchronization between 2 machines that located at different time zone area. Both machine were set its time zone according to its geographical location (Eg: server is at... (1 Reply)
Discussion started by: python
1 Replies

4. What is on Your Mind?

Well it took a bit of time but I am back on the road again...

I have not been very active on here for a while and when I have it was with CygWin... Well this MBP had to go back to the Apple Store for a new disk drive. It was repaired under warranty and I was very pleased with the service. However, returning this tub back to not quite the same as it was... (0 Replies)
Discussion started by: wisecracker
0 Replies
CHECK-ZONE-EXPIRATION(1p)				User Contributed Perl Documentation				 CHECK-ZONE-EXPIRATION(1p)

NAME
check-zone-expiration SYNOPSIS
# check-zone-expiration dnssec-tools.org paypal.com dnssec-tools.org will expire in 26 days, 2 hours, 16 minutes, 36 seconds paypal.com will expire in 12 days, 17 hours, 7 minutes, 1 second # check-zone-expiration -m 1123200 dnssec-tools.org paypal.com paypal.com will expire in 12 days, 17 hours, 6 minutes, 22 seconds DESCRIPTION
The check-zone-exiration script reports how long until a zone will expire by querying for the zone's (top level) RRSIG and calculating how much time is left before the signatures will no longer be valid. It will then report how much time is left in human readable form. If the -m switch is provided with a time argument (in seconds), it will only print output for zones that have less than that time left. OPTIONS
-m STRING --minimum-reporting=STRING Minimum reporting time, or else be silent for the zone COPYRIGHT
Copyright 2012-2012 SPARTA, Inc. All rights reserved. See the COPYING file included with the DNSSEC-Tools package for details. AUTHOR
Wes Hardaker, hardaker@tislabs.com SEE ALSO
donuts(1) perl v5.14.2 2012-05-07 CHECK-ZONE-EXPIRATION(1p)
All times are GMT -4. The time now is 08:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy