nodatime: Understand BclDateTimeZone failures under Mono

BclDateTimeZoneTest.AllZoneTransitions is disabled on Mono, but the reason it's 
disabled appears to no longer be correct.

Under Mono 2.10.9,  it fails with e.g.

36) Test Failure : 
NodaTime.Test.TimeZones.BclDateTimeZoneTest.AllZoneTransitions(Europe/Athens)
     Incorrect offset at 1952-06-30T22:00:00Z in interval EEST:[1952-06-30T22:00:00Z, 1952-11-01T21:00:00Z) +03 (+01)
  Expected: 02:00:00
  But was:  03:00:00

Where the instant at start-of-zone interval is returning +3 rather than the BCL 
+2.

We also have some failures at the end of the zone intervals, e.g.

46) Test Failure : 
NodaTime.Test.TimeZones.BclDateTimeZoneTest.AllZoneTransitions(Pacific/Noumea)
     Incorrect offset at 1978-02-26T11:59:59Z in interval NCST:[1977-12-03T13:00:00Z, 1978-02-26T12:00:00Z) +12 (+01)
  Expected: 11:00:00
  But was:  12:00:00


I'm pretty certain this _isn't_ what was documented:
// This test is effectively disabled on Mono as its time zone support is broken 
in the current
// stable release - see http://bugzilla.xamarin.com/show_bug.cgi?id=326 for 
example: even asking
// for the offset from UTC *for a UTC DateTime* can fail. We can restore these 
tests when we either
// find something to fix in Noda Time, or Mono is fixed.

I suppose this could be https://bugzilla.xamarin.com/show_bug.cgi?id=3333, but 
I'm not convinced.

Original issue reported on code.google.com by malcolm.rowe on 30 Jul 2012 at 8:59

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 37 (19 by maintainers)

Commits related to this issue

Most upvoted comments

Note: all tests pass on Mono 4.8.0 on Windows, although one is skipped (AwkwardLeapYears) as I expect that to be broken on Windows too.