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
GitHub or Developer Community 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.
This is bizarre.
If TZ is set to the value in /etc/timezone, it;s fine.
If TZ is set to a different valid timezone, it's fine.
If TZ is set to a garbage value that doesn't exist, it's fine.
If TZ is not set, exception.
minicloud@debianle:/tmp$ TZ=America/Sao_Paulo mono tztest.exe
6/5/2015 10:14:00 AM
minicloud@debianle:/tmp$ cat /etc/timezone
minicloud@debianle:/tmp$ mono tztest.exe
System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.
*** This bug has been marked as a duplicate of bug 30360 ***
It occurs to me that only /etc/localtime and /usr/share/zoneinfo/... are tried, /etc/timezone is not used at all. Note they are different: /etc/timezone contains the name of the zone, and /etc/localtime.
I can see that /etc/timezone is a debianism, and debian's tzsetup updates *both* /etc/timezone and /etc/localtime, the latter should work with Mono.
I'd say supporting /etc/timezone is a non-standard extension that is not necessary for most cases (are there relatively modern systems setting /etc/timezone and not setting /etc/localtime?)
Note they are different: /etc/timezone contains the name of the zone, and /etc/localtime contains the actual time zone data.