Search code examples
phpftputcgmt

HOW TO GET: Time Zone Setting of FTP Server?


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?


Solution

  • 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.