Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Thanks!#!/usr/bin/perl use Time::Zone; use Date::Format; my ($today_date, $today_time) = get_timezone(); sub get_timezone { $ENV{'TZ'} = 'America/New_York'; $today_date = time2str( "%Y/%m/%d", time); # Need the time without the seconds in %r $today_time = time2str( "%r", time); return $today_date, $today_time; } print "\n Date: $today_date - $today_time \n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Get time without seconds
by LanX (Saint) on Mar 25, 2013 at 00:23 UTC | |
by Anonymous Monk on Mar 25, 2013 at 00:46 UTC | |
Re: Get time without seconds
by igelkott (Priest) on Mar 25, 2013 at 00:25 UTC |