07-15-2008
2,
0
Join Date: Jul 2008
Last Activity: 22 July 2008, 1:24 AM EDT
Posts: 2
Thanks Given: 0
Thanked 0 Times in 0 Posts
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