Heh, yes. It seems that between the various sovereign lawmakers around the world, the Sun Java library writers and the WO library writers, it's nearly impossible to write clear, clean time manipulation code.

I think this is the gods' way of keeping us from building time machines with our software. Remember the Tower of Babel! :-)

Jerry

On Jan 10, 2007, at 3:48 PM, Colin Curtin wrote:


This solution appears to cause problems with our apps. We get this in the WO app log when starting up:

ZoneInfo: wrong magic number: UTC
ZoneInfo: /System/Library/Frameworks/JavaVM.framework/Versions/ 1.5.0/Home/lib/zi/ZoneInfoMappings (No such file or directory)

Any ideas?

It appears to me that the zoneinfo files in /usr/share/ zoneinfo and those in the JavaVM framework have different magic numbers as the first error message indicates:

Yes, after looking through our logs, this is the case. After removing the 'zi' directory entirely, the VM reverted to using UTC. It seems our magic trick didn't do much of anything ;)

After finding this, I tried copying the java Phoenix zoneinfo file and replacing the java Los_Angeles one with it:

# cd /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ Home/lib/zi/America
# sudo mv Los_Angeles Los_Angeles.old
# sudo cp Phoenix Los_Angeles

Phoenix doesn't switch to DST, so this seemed to fix it. I'm hesitant to use it - timestamps set now for mid-April might be an hour behind.

I hate time.

But since our data entry app only uses timestamps for checking date and not datetime, we should be okay.

I'll take a look at javazic and see how it does at compiling zoneinfo text files.

Whoopee,
Colin

--
Colin Curtin
Programmer, Kavli Institute for Theoretical Physics
UCSB
web:    http://www.kitp.ucsb.edu
email:  [EMAIL PROTECTED]
office: 805.893.6396

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jerrywwalker% 40gmail.com

This email sent to [EMAIL PROTECTED]


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems

    [EMAIL PROTECTED]
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to