Hello all.

I'm writing a FTP client in Perl. As a safety check I want to ensure I only download those files that have not been modified in, say, 900 seconds. To determine the age of the file I'm running a FTP dir list through File::Listing's parse_dir function. I then compare the diffrence between the current time and the last modified time of the file to see if I should download it or not. This works like a charm for all my local servers because the local time is the same on each server.

When I run my prog to grab files from a few remote servers I'm running into problems because the local time (and hence last mod time) on those servers varies depending on timezone. The last mod time (returned from parse_dir) is sometimes a time in the future (when compared with my localtime).

To be honest, I'm stumped as to proceed.

Any help at this point would be great!

In reply to Remote File - Last Modification Time by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.