[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
Y2K patch for Net::FTP
Since not everyone has their acts together...
*** FTP.pm~ Sat Sep 18 11:26:18 1999
--- FTP.pm Tue Jan 11 12:04:12 2000
***************
*** 184,196 ****
sub mdtm
{
my $ftp = shift;
my $file = shift;
! $ftp->_MDTM($file) && $ftp->message =~
/(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/
! ? timegm($6,$5,$4,$3,$2-1,$1 - 1900)
! : undef;
}
sub size {
my $ftp = shift;
my $file = shift;
--- 184,202 ----
sub mdtm
{
my $ftp = shift;
my $file = shift;
! $ftp->_MDTM($file) || return undef;
!
! if ($ftp->message =~ /19(\d{3})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/) {
! return timegm($6,$5,$4,$3,$2-1,$1);
! } elsif ($ftp->message =~ /(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/) {
! return timegm($6,$5,$4,$3,$2-1,$1 - 1900);
! } else {
! return undef;
! }
}
sub size {
my $ftp = shift;
my $file = shift;
**********************************************************************
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
************************************************************************
- Follow-Ups from:
-
Graham Barr <gbarr@pobox.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]