2

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?

naasking
  • 213
  • 1
  • 2
  • 9

1 Answers1

1

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

Mathias R. Jessen
  • 24,907
  • 4
  • 62
  • 95
  • See: http://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 04:15
  • Ran into this issue yet again. NTFS saves all timestamps in UTC, so that's not the problem. I actually wrote a program to save all the UTC timestamps on the server to a file, then update all the local file timestamps from that saved file, but viewing over FTP *still* returns the wrong timestamp when DST is in effect. The problem really is with IIS FTP which seems to be incorrectly applying DST offsets. – naasking Apr 19 '12 at 19:26