Change file dates error

I am having some problems changing file dates of files on a CIFS share. I believe that is what is causing the problems as drone doesn’t seem to have problems changing file dates of local files. The error is:

UpdateEpisodeFileService failed while processing [SeriesScannedEvent]: Not a valid Win32 FileTime. Parameter name: fileTime

System.ArgumentOutOfRangeException: Not a valid Win32 FileTime. Parameter name: fileTime at System.DateTime.FromFileTimeUtc(Int64 fileTime) at System.IO.FileSystemInfo.get_LastWriteTimeUtc() at NzbDrone.Common.Disk.DiskProviderBase.FileGetLastWriteUtc(String path) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Common\Disk\DiskProviderBase.cs:line 70 at NzbDrone.Core.MediaFiles.UpdateEpisodeFileService.ChangeFileDateToLocalAirDate(String filePath, String fileDate, String fileTime) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\UpdateEpisodeFileService.cs:line 123 at NzbDrone.Core.MediaFiles.UpdateEpisodeFileService.ChangeFileDate(EpisodeFile episodeFile, Series series, List`1 episodes) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\UpdateEpisodeFileService.cs:line 61 at NzbDrone.Core.MediaFiles.UpdateEpisodeFileService.Handle(SeriesScannedEvent message) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\UpdateEpisodeFileService.cs:line 99 at NzbDrone.Core.Messaging.Events.EventAggregator.PublishEvent[TEvent](TEvent event) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Messaging\Events\EventAggregator.cs:line 56

I am using freeNAS to share my files with CIFS. Any way to fix this?

I managed to figure out what was wrong!

The file dates that I was attempting to change were set in the future (i.e. 2098) which must cause some sort of problem in the renaming logic. I changed them manually to today and then nzbdrone had no problem changing to the correct dates.

The error comes from mono/.net not nzbdrone.
CIFS has ±2099 as maximum. So it will cause unexpected behaviour if you go beyond that limit. Quite possibly other programs might’ve behaved wrongly too.

So yes, changing the date manually is the only possible fix.