[Mono-bugs] [Bug 352210] New: Serialization and deserialization of datetime to and from xml, "shifts" the time with the timezone
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jan 8 00:47:04 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=352210
Summary: Serialization and deserialization of datetime to and
from xml, "shifts" the time with the timezone
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: System
AssignedTo: mono-bugs at ximian.com
ReportedBy: mbd at dbc.dk
QAContact: mono-bugs at ximian.com
Found By: ---
Created an attachment (id=189674)
--> (https://bugzilla.novell.com/attachment.cgi?id=189674)
Testcase - produces different results on Windows and Mono
Description of Problem:
Serializing and deserializating a datetime repeatedly, appears to "shift" the
time with the timezone. See attached (short) program. Expected output as on MS
cli/Windows:
doc = '<test><date>2007-06-15T10:30:10.5</date></test>'
docm = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T10:30:10.5</date></test>'
doc2m = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T10:30:10.5</date></test>'
doc3m = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T10:30:10.5</date></test>'
But, output on Mono/Linux:
doc = '<test><date>2007-06-15T10:30:10.5</date></test>'
docm = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T10:30:10.5+02:00</date></test>'
doc2m = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T08:30:10.5+02:00</date></test>'
doc3m = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T06:30:10.5+02:00</date></test>'
Note how the time is shifted down with 2 hours for each iteration.
Steps to reproduce the problem:
1. See attached program
2. Run attached program
Actual Results:
doc = '<test><date>2007-06-15T10:30:10.5</date></test>'
docm = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T10:30:10.5+02:00</date></test>'
doc2m = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T08:30:10.5+02:00</date></test>'
doc3m = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T06:30:10.5+02:00</date></test>'
Expected Results:
doc = '<test><date>2007-06-15T10:30:10.5</date></test>'
docm = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T10:30:10.5</date></test>'
doc2m = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T10:30:10.5</date></test>'
doc3m = '<?xml version="1.0" encoding="utf-8"?><test
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"><date>2007-06-15T10:30:10.5</date></test>'
How often does this happen?
Always
Additional Information:
Not tested on Mono/Windows, only MS/Windows
--
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.
More information about the mono-bugs
mailing list