Net::FTP module

Jarom Smith smith at
Wed May 3 17:01:41 CDT 2000

webtemp at writes:
>I'm trying to download(ftp) a file based on the current date.  When I grab
>the year from localtime(), I get 100.  When I print the complete time, I
>2000.  Is this supposed to
>be the correct response?

the time you get back from localtime is an offset from the year 1900,
probably more for compatibility with C's localtime() than for any other
reason.  See the documentation on localtime in your favorite book or

perldoc perlfunc  (skip down to the localtime part)

       localtime EXPR
               Converts a time as returned by the time function
               to a 9-element array with the time analyzed for
               the local time zone.  Typically used as follows:

                   #  0    1    2     3     4    5     6     7     8
                   ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =

               All array elements are numeric, and come straight
               out of a struct tm.  In particular this means that
               $mon has the range 0..11 and $wday has the range
               0..6 with sunday as day 0.  Also, $year is the
               number of years since 1900, that is, $year is 123
               in year 2023.

               If EXPR is omitted, uses the current time

               In a scalar context, returns the ctime(3) value:
                   $now_string = localtime;  # e.g., "Thu Oct 13 04:54:34

               Also see the Time::Local module, and the
               strftime(3) and mktime(3) function available via
               the POSIX module.

jarom smith
vp technology
new media merchants, inc.


The posting address is: san-diego-pm-list at

List requests should be sent to: majordomo at

If you ever want to remove yourself from this mailing list,
you can send mail to <majordomo at> with the following
command in the body of your email message:

    unsubscribe san-diego-pm-list

If you ever need to get in contact with the owner of the list,
(if you have trouble unsubscribing, or have questions about the
list itself) send email to <owner-san-diego-pm-list at> .
This is the general rule for most mailing lists when you need
to contact a human.

More information about the San-Diego-pm mailing list