Re: Finding out the time on an FTP server using perl
- From: Scott W Gifford <gifford@xxxxxxxxx>
- Date: Tue, 30 Aug 2005 10:53:29 -0400
amit.postbox@xxxxxxxxx writes:
> Hello,
>
> Does anybody know how to find out the local time (and the timezone) on
> a remote FTP server using perl?
I'm not aware of anything in the FTP protocol that allows that
directly. A few ideas:
* If you control the FTP server, you could also run a time server on
it you could query.
* If you can create a file on the FTP server, you can create it and
immediately ask for the modification time, which will be a good
approximation.
* You could see if there are any other services on the same server
that provide a timestamp, like HTTP.
Also, if you post the problem you're trying to solve, there might be a
way to do it without knowing the current time. For example, if you
want to see if a file has changed since last time you checked, you can
store the modification time of the file, and see if it's newer than
that. If you want to see if a file is still being modified, get the
modification time, sleep for 5 minutes, get it again, and see if it's
changed.
-----Scott.
.
- Follow-Ups:
- Re: Finding out the time on an FTP server using perl
- From: Stephen Patterson
- Re: Finding out the time on an FTP server using perl
- References:
- Finding out the time on an FTP server using perl
- From: amit . postbox
- Finding out the time on an FTP server using perl
- Prev by Date: Finding out the time on an FTP server using perl
- Next by Date: Re: Finding out the time on an FTP server using perl
- Previous by thread: Finding out the time on an FTP server using perl
- Next by thread: Re: Finding out the time on an FTP server using perl
- Index(es):
Relevant Pages
|
|