https://bugzilla.novell.com/show_bug.cgi?id=381103
Summary: DateTime "Kind" property defaults to Local (different
than .Net)
Product: Mono: Class Libraries
Version: 1.9.0
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
CC: [EMAIL PROTECTED]
Found By: ---
Created an attachment (id=208774)
--> (https://bugzilla.novell.com/attachment.cgi?id=208774)
DateTime issue
Tested on 1.9.0 & 1.9.1p2 and on Win and Linux.
When a time string is given without an indication of Local or Utc, .Net will
default to "unspecified", Mono defaults to "Local". This affects various
operations that use the resulting DateTime object as demonstrated in the
attached program.
Step to reproduce:
1. Console.WriteLine(DateTime.Parse("2008-04-15").ToLocalTime());
The attached program gives more examples, like below:
Example in .net
Input date: 2008-04-15T14:00:00
DateTime.Parse(2008-04-15T14:00:00):
kind: Unspecified
local: 2008-04-15T08:00:00
utc: 2008-04-15T20:00:00
In Mono:
Input date: 2008-04-15T14:00:00
DateTime.Parse(2008-04-15T14:00:00):
kind: Local
local: 2008-04-15T14:00:00
utc: 2008-04-15T20:00:00
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs