Jeremy,
While we are willing to help, your questions are more appropriate for the
Perl-Win32-Users mailing list. The Perl-Win32-GUI mailing list is
specifically for the Win32::GUI module. You can sign up for the
Perl-Win32-Users mailing list using the following link:
http://mailarchive.activestate.com
Someone posted the following code for handling dates and I've found it very
useful.
sub get_date {
# Define arrays for the day of the week and month of the year.
@days =
('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
@months =
('January','February','March','April','May','June','July','August','Septembe
r','October','November','December');
# Get the current time and format the hour, minutes and seconds. Add
# 1900 to the year to get the full 4 digit year.
($sec,$min,$hour,$mday,$mon,$year,$wday) =
(localtime(time))[0,1,2,3,4,5,6];
$time = sprintf("%02d:%02d:%02d",$hour,$min,$sec);
$year += 1900;
# Format the date.
$date = "$days[$wday], $months[$mon] $mday, $year at $time";
}
jb
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Jeremy Aiyadurai
Sent: Wednesday, April 04, 2001 12:57 AM
To: [email protected]
Subject: [perl-win32-gui-users] localtime($file->{'mtime'}) problem
hi
i am having a problem getting proper modified time dates of files when
using the win32:Internet ftp list, or the standard directory listing
i do this
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($file->{'mtime'});
then for each file i do something like this
print "$year/$mon/$mday $file->{'name'});
for every file, i end up getting a modified date of 69/11/31 thefile
eg;
69 - 11 - 31 bbsetup.exe 144152 bytes
69 - 11 - 31 clients.pl 29 bytes
_______________________________________________
Perl-Win32-GUI-Users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
_______________________________________________
Perl-Win32-GUI-Users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com