Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Downloading only new files added to a local path with Perl (FTP)

by AnomalousMonk (Archbishop)
on Aug 19, 2020 at 17:17 UTC ( [id://11120913]=note: print w/replies, xml ) Need Help??


in reply to Downloading only new files added to a local path with Perl (FTP)

As an aside:

# perl -e 'print time' will return the current time in Unix epoch form +at # So if you substract 43200, that should give you the current time min +us 30 minutes in Unix epoch format: time=$(perl -e 'print time-43200')

There are 86400 seconds in a day, so subtracting 43200 subtracts half a day. Subtract 1800 to go back half an hour.

c:\@Work\Perl\monks>perl -wMstrict -le "my $t = time; print $t; print scalar localtime $t; print scalar localtime $t - 43200; print scalar localtime $t - 1800; " 1597857155 Wed Aug 19 13:12:35 2020 Wed Aug 19 01:12:35 2020 Wed Aug 19 12:42:35 2020
See time, localtime, gmtime.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120913]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-23 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found