Bug 12686 - UnixFileSystemInfo.LastWriteTime is returning the UTC timestamp
Summary: UnixFileSystemInfo.LastWriteTime is returning the UTC timestamp
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: Mono.POSIX ()
Version: master
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-06-14 04:34 UTC by rubarax
Modified: 2013-06-14 16:20 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
small example app (1.06 KB, text/plain)
2013-06-14 04:34 UTC, rubarax
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description rubarax 2013-06-14 04:34:34 UTC
Created attachment 4114 [details]
small example app

From mono 3.0.2 (I don't know the version where it changed), the property LastWriteTime of the UnixFileSystemInfo class is returning the timestamp in UTC format instead of the local one. This was previously working fine.

The field LastWriteTimeUtc is also wrong because it's applying the UTC offset to a DateTime that is already in UTC format.

The methods Directory/File.GetLastWriteTime() continue correctly working.

I attach a tiny app code to check the behavior.
Comment 1 Jonathan Pryor 2013-06-14 16:20:14 UTC
Fixed in master/8c739740