I'm inclined to uncomment the lines in the systemv tz file. Have you confirmed 
that this works? That is, build a new version of Joda-time and try it out?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vladimir Sizikov
Sent: Tuesday, July 08, 2008 12:15 PM
To: joda-interest@lists.sourceforge.net
Subject: [Joda-interest] Major issues with joda time on Ubuntu Linux

Hi,

I'm currently investigating a couple of JRuby issues related to Time (and JRuby 
uses joda-time internally, with much satisfaction, I might add).

The particular issue is here:
http://jira.codehaus.org/browse/JRUBY-2541

Essentially, it boils down to a fact that Ubuntu users with US timezones end up 
getting the UTC as their default time zone rather than proper ones.

It all starts with JDK (JDK 6 or openJDK), which returns "SystemV/PST8PDT" 
default timezone for those who are on Pacific Coast and "SystemV/EST5EDT" for 
those who are on East Coast.

And, since JodaTime uses:
forTimeZone(TimeZone.getDefault())

it can't really understand such weird zones properly, and we end up with UTC. 
Pretty bad. :(

Here's a small jruby snippet that shows the problem:
jruby -rjava -e "p org.joda.time.DateTimeZone.getDefault.getID; p 
java.util.TimeZone.getDefault.getID"

"UTC"
"SystemV/PST8PDT"

We basically just print out the IDs obtained from getDefault() methods from JDK 
and JodaTime.

It would be really, really nice to have this fixed. So far, I see a couple of 
ways to do that:
1. In DateTimeZone.getConvertedId, add those SystemV conversions, so that 
"SystemV/PST8PDT" --> "PST8PDT", which is understood by JodaTime.

2. Uncomment SystemV/* definitions in tz's systemv file.

Thanks,
  --Vladimir

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project, along 
with a healthy diet, reduces your potential for chronic lameness and boredom. 
Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Joda-interest mailing list
Joda-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/joda-interest

Reply via email to