HOW TO GET: Time Zone Setting of FTP Server?

StackOverflowNewbie picture StackOverflowNewbie · Jul 14, 2010 · Viewed 13.8k times · Source

I'm using PHP's ftp_rawlist function to get a listing of files and their associated last-modified date/time. For my purposes, I need to know the time zone (or offset) of the the last-modified date/time. The dates/times alone are useless to me as I need to convert them to UTC.

Is there anyway to figure out what the FTP server's time zone setting is?

Answer

m1tk4 picture m1tk4 · Jul 27, 2010

There is no way defined in the FTP standard to determine remote server's time zone.

If you have write permissions to the FTP server I guess you could upload the file and then calculate the difference between the file time reported by FTP and locally.