Help me to do this


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help me to do this
# 1  
Old 11-12-2008
MySQL Help me to do this

Hai,

I have written a script in perl which retrieve log data from database If we give the time from which it is received

perl getlog.pl -F '2008:11:01 00:00:01' give the logs that are received after 2008:11:01 00:00:01

Now what I want to do is, The value of F (From time in the above command) should be taken by default such that its value should be 5 hours before the current time.

How can I do this.

Please help me in doing this.

Thanks,
Prakash.
# 2  
Old 11-12-2008
this would help you obtain the time that was five hours before current time:
Code:
scalar localtime(time() - 18000)

format it the way you want, and use it as the default value
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question