[System.Core/Android] Fix standalone unit tests.
commit8b90653ff3048951167da9e6c7cc074a90815c5b
authorJonathan Pryor <jonpryor@vt.edu>
Tue, 7 Oct 2014 17:51:10 +0000 (7 13:51 -0400)
committerJonathan Pryor <jonpryor@vt.edu>
Tue, 7 Oct 2014 17:59:49 +0000 (7 13:59 -0400)
tree013ed37b466a0decac9e19d699a86435065dab83
parent10c2cc4d3f5ddc32a3999a42c92bbf78a12aa86d
[System.Core/Android] Fix standalone unit tests.

Commit 5564dad1 broke the self-test (for testing on the developer
machine, not an Android target). Fixup the comment so that appropriate
data is grabbed and used for testing, and improve
AndroidTimeZones.GetDefaultTimeZoneName() so that the default timezone
ID can be specified via the __XA_OVERRIDE_TIMEZONE_ID__ environment
variable for testing.

Finally, demonstrate TimeZoneInfo.GetUtcOffset(DateTime) use so that I
can get better insight into the timezone data stored within the
database:

$ __XA_OVERRIDE_TIMEZONE_ID__=America/New_York ANDROID_ROOT=`pwd` ANDROID_DATA=`pwd` mono --debug tzi.exe --offset=1969-01-01
Using DateTime Offset: 1/1/1969 12:00:00 AM
DB type: System.AndroidTzData
name=Africa/Abidjan                           Africa/Abidjan                          From Offset: 00:00:00
name=Africa/Accra                             Africa/Accra                            From Offset: 00:00:00
name=Africa/Addis_Ababa                       Africa/Addis_Ababa                      From Offset: 03:00:00
...
mcs/class/System.Core/System/TimeZoneInfo.Android.cs