Anthony J Segelhorst wrote:
> 
> I am trying to set up a script that will do the do a current time -1
> routine.
> 
> Examples:
> 
> Current Time:
> mmddyy:hhss
> 052804:1030
> 
> Output:
> 052804:0930
> 
> Current Time:
> 052704:0015
> 
> Output:
> 052604:23:15
> 
> I think the add_delta module is where I need to go, but I have never used
> modules before.

$ perl -e'
use POSIX qw/ strftime /;         
my @current_time = localtime time;
my @minus_one_hour = localtime time - 3600;
print strftime( "%m%d%y:%H%M\n", @current_time ),
      strftime( "%m%d%y:%H%M\n", @minus_one_hour );
'
052804:1530
052804:1430



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to