Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJonathan Pryor <jonpryor@vt.edu>2013-06-15 00:11:53 +0400
committerJonathan Pryor <jonpryor@vt.edu>2013-06-15 00:18:47 +0400
commit8c7397406e3f4bd1be57eb5aadd8f924dd3c0710 (patch)
tree85e377ab0a98bec3857ca408bd136ba50960a5c0 /data
parent0418ecd93033138cbf1316a5372b511ffdbc3c8c (diff)
[Mono.Posix] Fix time_t conversions.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=12686 Mono.Unix.UnixFileSystemInfo.LastWriteTime & co. were hilariously wrong. Just...hilariously wrong. $ ls -l bxc12686.exe -rwxr-xr-x 1 jon staff 4096 Jun 14 15:43 bxc12686.exe $ csharp -r:Mono.Posix csharp> new Mono.Unix.UnixFileInfo("bxc12686.exe").LastWriteTime; 6/14/2013 7:43:12 PM Note: I'm currently in EDT (US Eastern Daylight Time). LastWriteTime is supposed to be in the local time; it's 4 hours off (which also happens to be the EDT UTF offset: -4:00). The fundamental problem was that NativeConvert.FromTimeT() was written for pre-.NET 2.0 environments, which precluded use (or knowledge of!) DateTimeKind. Now that .NET 1.1 is no longer supported, and 2.0 is on the its deathbead (bring on 4.5!), we can be smarter and let DateTime sanely handle the conversion logic for us. After the fix: $ csharp -r:Mono.Posix csharp> new Mono.Unix.UnixFileInfo("bxc12686.exe").LastWriteTime; 6/14/2013 3:43:12 PM
Diffstat (limited to 'data')
0 files changed, 0 insertions, 0 deletions