NSTimestamp problem

2008-06-15 Thread Gino Pacitti
Does anyone have a link to solution to hour of day being incorrect? NSTimeZone tz = NSTimeZone.timeZoneWithName(Europe/London, true); java.util.GregorianCalendar calendar = new GregorianCalendar(); calendar.setTime(new NSTimestamp()); int year =

Re: NSTimestamp problem

2008-06-15 Thread Simon McLean
time zone. Europe / London is currently in BST which is 1 hour ahead of GMT. i think if you also print out GregorianCalendar.HOUR_OF_DAY you'll find it's = 11, not 12, because it's using GMT. depending on what you are trying to achieve you may find it easier to work everything at GMT

Re: NSTimestamp problem

2008-06-15 Thread Ray Kiddy
On Jun 15, 2008, at 5:05 AM, Simon McLean wrote: time zone. Europe / London is currently in BST which is 1 hour ahead of GMT. i think if you also print out GregorianCalendar.HOUR_OF_DAY you'll find it's = 11, not 12, because it's using GMT. depending on what you are trying to achieve

Re: NSTimestamp problem

2007-01-10 Thread Art Isbell
On Jan 9, 2007, at 9:22 AM, Sacha Michel Mallais wrote: On Jan 4, 2007, at 12:49 PM, Colin Curtin wrote: So we symbolic linked the Java directory to the native OSX one: #!/bin/bash # You'll want to sudo this. cd /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/ Home/lib mv

Re: NSTimestamp problem

2007-01-10 Thread Colin Curtin
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

Re: NSTimestamp problem

2007-01-10 Thread Chuck Hill
On Jan 10, 2007, at 12:48 PM, Colin Curtin wrote: I hate time. Amen, brother! Chuck -- Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.

Re: NSTimestamp problem

2007-01-10 Thread Jerry W. Walker
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

Re: NSTimestamp problem

2007-01-09 Thread Sacha Michel Mallais
On Jan 4, 2007, at 12:49 PM, Colin Curtin wrote: We ran into this problem as well. Found a solution a few minutes ago. OSX uses the same tz-link data that Java, Linux, Solaris, etc. uses. So we symbolic linked the Java directory to the native OSX one: #!/bin/bash # You'll want to sudo this.

Re: NSTimestamp problem

2007-01-04 Thread Colin Curtin
We ran into this problem as well. Found a solution a few minutes ago. OSX uses the same tz-link data that Java, Linux, Solaris, etc. uses. So we symbolic linked the Java directory to the native OSX one: #!/bin/bash # You'll want to sudo this. cd

Re: NSTimestamp problem

2006-12-22 Thread David den Boer
Here is the gist of the problem : 1. You need Java 1.4.2.11 or Java 1.5.0.6 to get the new zone files. 2. If you are using NSTimestamp, you need to not use it for timezone stuff. WO still uses NSTimezone when you pass in a Java TimeZone, and uses its own zone files, which are hopelessly out

NSTimestamp problem

2006-12-19 Thread Dan Faber
I notice the sun tool says: The java.vendor property value must be Sun Microsystems Inc.. so I bet it won't work for Apple JVMs. It didn't appear that Apple had a JVM release that met the dates shown on the sun page. Maybe we are stuck? Thanks to all for the VERY timely replies to my

NSTimestamp problem

2006-12-18 Thread Dan Faber
Hi everyone: I have just run into an apparent NSTimestamp problem. I have a scheduling program, and it has been working well. Recently we tried to schedule an appt for March, and the NSTimestamp is giving us back a time that is one hour earlier than the time that is designated

Re: NSTimestamp problem

2006-12-18 Thread Jerry W. Walker
JVMs had adapted to the change in law. Regards, Jerry On Dec 18, 2006, at 8:31 PM, Dan Faber wrote: Hi everyone: I have just run into an apparent NSTimestamp problem. I have a scheduling program, and it has been working well. Recently we tried to schedule an appt for March

Re: NSTimestamp problem

2006-12-18 Thread Chuck Hill
, at 8:31 PM, Dan Faber wrote: Hi everyone: I have just run into an apparent NSTimestamp problem. I have a scheduling program, and it has been working well. Recently we tried to schedule an appt for March, and the NSTimestamp is giving us back a time that is one hour earlier than the time

Re: NSTimestamp problem

2006-12-18 Thread Ken Anderson
have just run into an apparent NSTimestamp problem. I have a scheduling program, and it has been working well. Recently we tried to schedule an appt for March, and the NSTimestamp is giving us back a time that is one hour earlier than the time that is designated. This occurs between March

Re: NSTimestamp problem

2006-12-18 Thread James Stead
everyone: I have just run into an apparent NSTimestamp problem. I have a scheduling program, and it has been working well. Recently we tried to schedule an appt for March, and the NSTimestamp is giving us back a time that is one hour earlier than the time that is designated. This occurs

Re: NSTimestamp problem

2006-12-18 Thread Ken Anderson
. Java. Dates. If there is a hell on earth for developers, it is this. Chuck On Dec 18, 2006, at 8:31 PM, Dan Faber wrote: Hi everyone: I have just run into an apparent NSTimestamp problem. I have a scheduling program, and it has been working well. Recently we tried to schedule

Re: NSTimestamp problem

2006-12-18 Thread Bob Stuart
) for dates in and out of DST. You could also store the date (at noon) in one field and the in another. Java. Dates. If there is a hell on earth for developers, it is this. Chuck On Dec 18, 2006, at 8:31 PM, Dan Faber wrote: Hi everyone: I have just run into an apparent NSTimestamp

Re: NSTimestamp problem

2006-12-18 Thread Art Isbell
On Dec 18, 2006, at 6:35 PM, Bob Stuart wrote: I notice the sun tool says: The java.vendor property value must be Sun Microsystems Inc.. so I bet it won't work for Apple JVMs. It didn't appear that Apple had a JVM release that met the dates shown on the sun page. Maybe we are stuck?