in reply to Question about perl & oracle & and a SQL query

localtime() can be used with arguments. When all that you want is the time from 1 hour ago, localtime(time - 3600) should work just fine.

Assuming that your code is working, you could try the following:

use POSIX 'strftime'; $now = lc strftime("%d/%m/%y %H:%M:%S", localtime); $hourago = lc strftime("%d/%m/%y %H:%M:%S", localtime(time - 3600) );

Regards,
Luke

Replies are listed 'Best First'.
Re^2: Question about perl & oracle & and a SQL query
by Sombrerero_loco (Beadle) on Feb 09, 2009 at 14:23 UTC
    Thanks!! its just works! :::When you dream, there're no rules, ppl can fly...anything can happen!!!:::