Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I'm still investigating but it appears with Android 4.3 and/or Mono for Android 4.8.x (I have 4.8.1 beta installed now) that System.TimeZoneInfo is not working. For example, if I try to return TimeZoneInfo.Local.StandardName it errors out.
Created attachment 4514 [details]
this is a show stopper for me. Please fix ASAP. See sample app attached.
What is the output of:
adb shell getprop persist.sys.timezone
If it prints nothing, then this is Bug #4902.
What device is this? What stack trace does it generate?
It's a Jelly bean 4.3 emulator, I'll try to get the other info you need now. I included a sample if you can run it against a 4.3 emulator, I'm using the Mac if that matters.
The message + exception is:
Object reference not set to an instance of an object
at XamSample.MainActivity+<OnCreate>c__AnonStorey0.<>m__0 (System.Object , System.EventArgs ) [0x0000d] in /Users/Neal/Dev/XamSample/XamSample/MainActivity.cs:35
I don't know how to run adb on a Mac. If you want to walk me through it reply with info or call me at 323-1223
By default,the Android SDK is installed into:
Thus, please open Terminal.app, then:
./adb shell getprop persist.sys.timezone
I ran that command and I get "America/New_York
But I'm not sure what this is for, I do have the emulator running but am I in fact getting the value from the emulator?
I did a ./adb devices and it shows the emulator, it again returned America/New_York
Did you try the sample against Android 4.3 and repro the issue by any chance?
If you don't have a hardware device plugged in, then `adb` will connect to your emulator. If you did have both the emulator running and a device plugged in, you'd get an error asking you to specify a target to connect to.
> Did you try the sample against Android 4.3 and repro the issue by any chance?
I tested against gingerbread (2.3.3 api 10) and it works fine. It seems to be isolated to Android 4.3 (18)
Please see bugzilla case 7953 as it may be similar and still need to be fixed?
GetSystemTimesZones is also dead.
- I also see the bug on an Android 4.3 Nexus 4.
- My device correctly returns my timezone with "adb shell getprop persist.sys.timezone"
- You can test for the bug in one line of code in any app:
var offset = TimeZoneInfo.Local.GetUtcOffset(DateTime.Now.AddDays(10))
in the example above, ".Local" will be null
- My deployed app in store is now trashed on 4.3 devices because of this bug (if that helps anybody prioritize)
- This bug affects the popular ServiceStack.Text library which makes use of the TimeZone lookup
Google/Android changed their timezone info file format. It used to consist of the files $ANDROID_ROOT/usr/share/zoneinfo/zoneinfo.dat and $ANDROID_ROOT/usr/share/zoneinfo/zoneinfo.idx.
Now, none of those exist, and instead it's $ANDROID_ROOT/usr/share/zoneinfo/tzdata.
Looks like we need to port: https://android.googlesource.com/platform/libcore/+/master/luni/src/main/java/libcore/util/ZoneInfoDB.java
Mono has Android v4.3 tzdata support as of mono/82a197e4:
Fixed in monodroid/33e5abc7.
Today we are try to verify this issue with following builds :
XS 4.1.9(build 7)
When we run the attached sample application in comment 1 on Device(4.3), It deploy successfully without any error and "Hello world click me button appears" and when we click on this button it converts its into "IST" button.
I am not sure about the correct behavior. Please suggest if a miss something to check.