Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

by AnomalousMonk (Bishop)
on Aug 19, 2020 at 17:17 UTC ( #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
Node Status?
node history
Node Type: note [id://11120913]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2020-10-21 14:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (217 votes). Check out past polls.

    Notices?