[Mono-dev] [PATCH] Read timezones from the registry on Windows.

Miguel de Icaza miguel at novell.com
Mon May 17 13:40:46 EDT 2010


    Great patch!

> The code doesn't check whether it's running on (or compiled for)
> Windows, just whether the appropriate registry key exists. I don't
> know if that's the preferred way of doing things.

Would you mind changing the code to not probe the registry unless it is
not running on Unix?   This can be done with the following code:

                int p = (int) Environment.OSVersion.Platform;
                if ((p == 4) || (p == 6) || (p == 128)) {
                        Console.WriteLine ("Running on Unix");
                } else {
                        Console.WriteLine ("NOT running on Unix");


More information about the Mono-devel-list mailing list