Make sure you have TZ set, Date::Manip uses it to figure out the local Time
Zone.

This example, from a working perl script, uses Pacific Time Zone in Oregon
USA.

use Env qw(@TZ);                #Set the TZ
push @TZ, 'PST8PDT';

use Date::Manip;
&Date_Init();
print &UnixDate("today","%m%d%y");

-Fauzi

-----Original Message-----
From: Breedlove, Robert [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 16, 2000 9:50 AM
To: Perl-Win32-Users Mailing List
Subject: RE: Date::Manip and printed date format


Use UnixDate() function:

UnixDate('today',"%m/%d/%Y");

-----Original Message-----
From: Ben Conrad [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 16, 2000 9:18 AM
To: Perl-Win32-Users Mailing List
Subject: Date::Manip and printed date format


Hello,

I'm using 

use Date::Manip;
$TZ="EST5EDT";
$date=&ParseDate("today");
print "Date is $date\n";        # output: Date is 2000051612:16:47

What is the easiest way to get that ouput to look like 05/16/2000 or
05-16-2000?  I need various date formats for various log files that I'm
parsing.

Thanks,

Ben.

____________________________________
 Ben Conrad
 NT Administrator, NOS Team
 GENUITY INC.
 617.873.5146
 [EMAIL PROTECTED]
____________________________________ 
   

---
You are currently subscribed to perl-win32-users as: [EMAIL PROTECTED]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]


---
You are currently subscribed to perl-win32-users as: [EMAIL PROTECTED]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to