I've discovered the cause of the problem - my PC is NTFS; my thumbdrive is FAT32 - apparently there is a known conversion bug causing time and date information to sometimes have errors converting from one to the other with perfect precision.

OK, so I need a C# solution. Probably, for my purposes, the simplest thing to do is to set the "seconds" part of the DateTime of the file to 0 before doing the comparisons, without changing anything else. What's the easiest way to do that? (the DateTime.Second property is read only)