Home Dashboard Directory Help
Search

C# LastWriteTime BUG by 76612D92-BEEF-41E2-B5D9-E9272C509200


Status: 

Closed
 as By Design Help for as By Design


0
0
Sign in
to vote
Type: Bug
ID: 127919
Opened: 6/9/2006 1:59:49 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

When we read the LastWriteTime from some files, the Time is reporting back an hour off.
Details
Sign in to post a comment.
Posted by pablodg on 1/19/2009 at 7:50 AM
It would be nice if you could fix this.

.NET framework reports wrong time info for files when adjust clock for daylight savings is set, which makes any application based on .NET framework and file dates to fail under such conditions.

You can reproduce it from http://www.codeproject.com/KB/files/csharpfiledate.aspx?msg=2885854#xx2885854xx
Posted by Microsoft on 7/20/2006 at 10:13 AM
Hello,
Thanks for reporting this issue. This is probably due to multiple handles for this file being opened when this property is called. Our current implementation uses FileFirstFile to get the last write time if GetFileAttributesEx returns an error http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/file_times.asp has more information on the reason for the time difference for last write time with FileFirstFile.
Thanks
Lakshan Fernando
BCL Team
Posted by Microsoft on 7/10/2006 at 12:00 AM
Thanks for the response, we are unable to repro the issue with the repro steps provided. If you could provide us with a sample project/solution and the exact repro steps, we would still like to address the issue.

Thank you,
Nagesh, Visual Studio Product Team
Posted by Microsoft on 7/9/2006 at 11:49 PM
Thank you for your feedback. We are investigating this issue.

Thank you, Visual Studio Product Team.
Sign in to post a workaround.