Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The IIS FTP server is reporting file timestamps without applying daylight savings time offset, ie. in Windows explorer, a file shows a modification timestamp of 2012-01-01T01:27 and the FTP server shows it as 2012-01-01T02:27.

This is screwing up some file synchronization scripts that use the timestamps to ensure backups are complete and up to date. Is there any way to configure IIS FTP to export the correct timestamps?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

IIS W3SVC timestamps are in Universal Coordinated Time, UTC is always the same, DST or not.

share|improve this answer
    
See: higherlogics.net/personal/timestamps.png That's browsing the same directory on FTP host via FTP and Windows explorer. You can clearly see the DST problem. Even assuming IIS is returning the timestamp in UTC, it's clearly not adjusting the timestamp which was saved in DST, so it would still be off by an hour. How do I fix this? –  naasking Mar 29 '12 at 15:55
    
Ahh, like that, what timezone is your computer/locale set to? –  Mathias R. Jessen Mar 29 '12 at 20:00
    
Eastern time (UTC-5). In the image, I'm browsing the FTP from the FTP server. Since it's all on the same machine, I don't think locale settings would matter. Whatever locale-specific transformation IIS is performing, the FTP client would use the same locale and reverse it no? –  naasking Mar 29 '12 at 20:22
    
Actually it might matter. If "explorer time" is adjusted twice from UTC (once for Time Zone setting, and one more time for DST), but IIS only adjusts timestamp for the time zone but ignores DST settings, that would explain it. Not sure how i'd go about fixing that –  Mathias R. Jessen Mar 29 '12 at 20:30
    
The problem isn't explorer so much, it's the timestamp in the file system attributes. The sync tool I'm using is WinSCP and it's reading the same time as explorer, ie. off by one hour compared to FTP. I found a setting in WinSCP to manually adjust the time offset of remote timestamps, so I got around it temporarily, but it's going to come up next DST change, so I was hoping for something more permanent. Oh well. –  naasking Mar 30 '12 at 4:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.