Commit Graph
25 Commits
Author SHA1 Message Date
Marcos Henrich 411d4aa0bb Test TimeZoneInfo.GetUtcOffset with multiple DST and DateTimeKind. 2014-10-03 10:38:11 +02:00
Marcos Henrich 8ab9a76c7e Updated TimeZoneInfoTest.DSTTransisions to correct .NET behavior. 2014-10-03 10:38:10 +02:00
Sasha Kotlyar 76a25717e7 Miscellaneous changes per review 2014-08-04 19:15:10 -04:00
Sasha Kotlyar a66732c039 [TimeZoneInfo] Fix issue with some floating DST transition times creating invalid DateTime values, and implement ToSerializedString and FromSerializedString.
This change is released under the MIT license.
2014-08-03 15:25:43 -04:00
Rolf Bjarne Kvinge 19f49f93f9 Revert "Revert "Merge branch 'master' of https://github.com/mono/mono""
This reverts commit 8f09dad435.

8f09dad435 is reverting a merge commit,
which will not do what you think it does. It will revert much more,
so revert the revert to get back the unintentionally reverted commits.

It looks like the next commit (1a15d4ec54)
is doing the original intention (reverting 164f9cbec4),
so this revert will leave the tree in a good state, with no pending
reverts.
2014-04-25 16:57:01 +02:00
Alexis Christoforides 8f09dad435 Revert "Merge branch 'master' of https://github.com/mono/mono"
This reverts commit 9dd632fb9e, reversing
changes made to 164f9cbec4.
2014-04-23 14:56:39 -04:00
Marek Habersack 73f09870a1 Update test description to include full bug report url 2014-04-23 17:24:37 +02:00
Marek Habersack 3df23604a4 Correctly apply DST offset if the date being converted falls after Jan 1st and is within the last year's DST zone
The adjustment rule must take into account that DST can start in the previous year and extend to some initial period
of the DateTime's year. This patch makes the code take that into account and correctly applies the DST offset to the
date being converted to some target timezone.

Fixes xambug https://bugzilla.xamarin.com/show_bug.cgi?id=17155
2014-04-23 17:15:18 +02:00
Marek Habersack 44c0689534 A couple of fixes for TimeZoneInfo.ConvertTime.
* ConvertTime (DateTime, TimeZoneInfo) now correctly takes the date kind from the DateTime parameter
      and uses it to select the source time zone according to this criteria:

         if DateTime kind is Utc, use TimeZoneInfo.Utc as source, in all other cases use TimeZoneInfo.Local

    * Move argument checks in ConvertTime (DateTime, TimeZoneInfo, TimeZoneInfo) so that there's no risk of a NREX
      should sourceTimeZone be null.

Added relevant tests for all of the above changes.
2014-04-23 14:53:01 +02:00
Alexander Köplinger b0032294da [Test] Cleaned up how a bunch of tests were ignored
Previously, many tests just had a return statement when the test shouldn't
be executed (e.g. Unix-only). This made it look like the test was successful
when in fact it wasn't executed at all.
Assert.Ignore() is now used instead to correctly exclude those tests.
2014-02-23 19:44:21 +01:00
Alistair Bush 98f1c8c584 Return Local DateTime instead of Unspecified for >net_4_0 2013-10-19 23:41:17 +13:00
Marek Safar 0e9c53b052 Workaround for legacy nunit 2013-08-15 11:17:02 +02:00
Marek Safar 8ffb6b1981 Workaround limitation of ancient nunit 2013-07-31 10:55:27 +02:00
Andreas Auerswald a4edd897b5 Add TimeZoneInfo Serialization
Add serialization for the TimeZoneInfo, TimeZoneInfo.AdjustmentRule and TimeZoneInfo.TransitionTime class. It is compatible with the serialization in .Net for cross serialization/deserialization from Mono to .Net and vice versa.

The code in this commit is released under the terms of the MIT/X11 license.
2013-07-08 10:39:51 +02:00
Rolf Bjarne Kvinge 142e70fdcc TimeZoneInfo.Local must be cached, otherwise reference comparisons fail later on.
This fixes an issue reported here: http://lists.ximian.com/pipermail/monotouch/2012-September/011784.html
2012-09-17 12:05:43 +02:00
Adam Brengesjö f0b9dd6ccc Unit tests for issue #3333 2012-06-27 20:24:13 +02:00
Miguel de Icaza 2852ed0b59 Update copyrights 2011-09-13 18:26:13 -04:00
Sebastien Pouliot 7fad18abb0 Ensure we can roundtrip 'Local' (special case) timezone. Fix bug #326 2011-09-09 11:29:52 -04:00
Stephane Delcroix 4d9ef99134 2008-05-26 Stephane Delcroix <[email protected]>
* Timezonetsnfo.cs: test for bnc #391011

svn path=/trunk/mcs/; revision=104051
2008-05-26 09:38:22 +00:00
Stephane Delcroix 76d1357965 2008-01-24 Stephane Delcroix <[email protected]>
* TimeZoneInfo.TransitionTime.cs: check for a whole number of
	milliseconds instead of a whole number of seconds.

svn path=/trunk/mcs/; revision=93788
2008-01-24 12:45:29 +00:00
Stephane Delcroix 4da3e53637 2008-01-23 Stephane Delcroix <[email protected]>
* TimeZoneInfo.AdjustmentRuleTests.cs:
	* TimeZoneInfo.TransitionTimeTests.cs: disable failing tests at runtime on
	windows

svn path=/trunk/mcs/; revision=93626
2008-01-23 07:18:04 +00:00
Miguel de Icaza 0a6c4c0470 Shut up all those warnings
svn path=/trunk/mcs/; revision=93597
2008-01-22 22:50:33 +00:00
Stephane Delcroix 54b5c225bf 2008-01-22 Stephane Delcroix <[email protected]>
* TimeZoneInfoTest.cs: disable failing tests at runtime on windows

svn path=/trunk/mcs/; revision=93514
2008-01-22 12:03:03 +00:00
Sebastien Pouliot 19490180ec 2008-01-21 Sebastien Pouliot <[email protected]>
* TimeZoneInfo.TransitionTimeTest.cs: Add test case for Equals to
	validate Gendarme finding.


svn path=/trunk/mcs/; revision=93464
2008-01-22 00:46:34 +00:00
Stephane Delcroix 8d01f50a11 2007-12-20 Stephane Delcroix <[email protected]>
* TimeZoneInfoTest.cs:
	* TimeZoneInfo.AdjustmentRule.cs:
	* TimeZoneInfo.TransitionTime.cs: Finally adding the 60 tests.

svn path=/trunk/mcs/; revision=91702
2007-12-20 13:03:34 +00:00