8

With lftp, when I do ls I get the listing of the files on the FTP server, with their date. However, the timezone is not displayed.

On my local machine, I can do ls -l --time-style=full-iso to see the timezone, but this command doesn't work with lftp.

Generally speaking, does the FTP protocol allow for server timezone discovery?

When I do a file listing (ls), how can I see which timezone the date is supposed to be?

2 Answers 2

9

http://ohse.de/uwe/ftpcopy/faq.html#timestamp

The FTP protocol, misdesigned as it is, doesn't include time zone information. This means client programs have to guess what the time zone of the server is. At least my programs aren't good in guessing, so they don't even try. ftpcopy simply assumes UTC (GMT, greenwhich mean time).

5

What I did before is creating an empty file and check the creation date. This usually gives a good estimation of time difference. I actually store the difference in seconds. Just in case I need it to sync files between systems.

1
  • Thanks, was looking for a way to determine just the time (not timezone) on a FTP server. Was searching for commands or loggings. Then this came along, created an empty file, uploaded to server and looked at creation date, and now I know the time on the server (approx. at least the hour and minutes) Commented May 15, 2018 at 11:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .