Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HOW TO GET: Time Zone Setting of FTP Server?

Tags:

php

utc

gmt

ftp

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?

like image 232
StackOverflowNewbie Avatar asked Feb 04 '23 03:02

StackOverflowNewbie


1 Answers

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.

like image 82
m1tk4 Avatar answered Feb 23 '23 00:02

m1tk4