Re: [Ikvm-developers] Default locale
Brought to you by:
jfrijters
From: Jeroen F. <je...@su...> - 2010-03-16 06:08:09
|
Hi Michael, The "Malay Peninsula Standard Time" timezone name is not one of the recognized names, so it should fall back to GMT+08:00, but there's a bug in the fall back code. I will fix this, but in the mean time a workaround is to explicitly set the user.timezone Java system property (either in code or via the app.config). Code (must be executed before the default timezone is first queried): java.lang.System.setProperty("user.timezone", "Asia/Singapore"); App.Config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="ikvm:user.timezone" value="Asia/Singapore" /> </appSettings> </configuration> Regards, Jeroen > -----Original Message----- > From: Michael Kay [mailto:mi...@sa...] > Sent: Monday, March 15, 2010 10:52 AM > To: ikv...@li... > Subject: [Ikvm-developers] Default locale > > > I have a Saxon user in Singapore who appears to be getting a UK locale > as > the result of the Java call Locale.getDefault(). Specifically, > Locale.getDefault().getCountry() appears to be returned as "gb", and > new > GregorianCalendar() appears to return a date/time with timezone offset > 0. > Yet a screen-shot of the user's control panel shows the timezone set to > GMT+08:00 (Kuala Lumpur, Singapore), and the C# calls > > TimeZone tz = TimeZone.CurrentTimeZone; > TimeSpan ts = tz.GetUtcOffset(DateTime.Now); > > produce > > tz.StandardName = "Malay Peninsula Standard Time" > tz.GetUtcOffset(DateTiome.Now) = 08:00:00 > > I can't reproduce this effect on my own machine; when I change the > timezone > settings in Windows control panel, Locale.getDefault() changes as > expected. > > Any ideas? > > > Regards, > > Michael Kay > http://www.saxonica.com/ > http://twitter.com/michaelhkay > > > ----------------------------------------------------------------------- > ------- > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Ikvm-developers mailing list > Ikv...@li... > https://lists.sourceforge.net/lists/listinfo/ikvm-developers |