网上很多都是说的需要添加use_localtime=YES
这个参数,但是一般部署ftp服务的服务器的时区大家都会去验证.我这里也遇到了这个问题,并且我检查了服务器的时区都是ok的,那么问题就来了.服务器时区正确,在ubuntu中查看的文件修改时间也是正确的.那么剩下的可能就是ftp
服务中开启这行参数后,读取了错误的时间.让ftp
服务认为当前时间是GMT
时间,而当前服务器时区已经是GMT+8
的上海时区了,所以导致在已经GMT + 8的基础上又+8了.
所以要做的操作就是在这里关闭这个配置.这样其实就可以在浏览器中显示正确的时间了
# If enabled, vsftpd will display directory listings with the time
# in your local time zone. The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=NO