• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Timestamps and PostgreSQL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Timestamps and PostgreSQL


  • Subject: Re: Timestamps and PostgreSQL
  • From: Paul Hoadley <email@hidden>
  • Date: Tue, 7 Dec 2010 10:21:03 +1030

On 07/12/2010, at 9:16 AM, Chuck Hill wrote:

On Dec 6, 2010, at 2:10 PM, Paul Hoadley wrote:

On 07/12/2010, at 6:13 AM, Chuck Hill wrote:

Is there a Wiki page for EOF and Postgres?  It strikes me as this is something that should be documented.  I don't think  we can "fix" it, as it would impact people with existing data.

I can put it here:

http://wiki.objectstyle.org/confluence/display/WO/Database+Compatibility+and+Comparisons-PostgreSQL

Perhaps more likely to be found here:
http://wiki.objectstyle.org/confluence/display/WO/Project+WONDER-Frameworks-PostgresqlPlugin

OK.

I'm just trying to nail down one last detail.  I've noted that calling TimeZone.setDefault() in the Application constructor doesn't seem to occur early enough to influence the JDBC driver's creation of its default GregorianCalendar.  Setting user.timezone works, but it _doesn't_ work from a Properties file, which would have been ideal.  The only method that works is setting -Duser.timezone=UTC as a launch argument, which is a pain because I have to remember to do it every time I set up a new app.  Is there any way I can get some code called even earlier than the Application constructor?

I suspect the problem is that the driver is in /Library/Java/Extensions

Yeah, that's where I've got it.

and so is getting loaded and initialized by the boot class loader (or is that root class loader?  Q will know.).  If that is where it is, try removing it from there and adding it to /Libraries in your application.  That should delay loading until after the Properties values are available.

Surprisingly, that _doesn't_ work.  I see:

  user.timezone=UTC

And then later in the TimestampUtils constructor:

TimestampUtils.TimestampUtils: System.getProperty("user.timezone") = UTC
TimestampUtils.TimestampUtils: defaultCal.getTimeZone() = sun.util.calendar.ZoneInfo[id="Australia/Adelaide"...

defaultCal is its default GregorianCalendar that's causing the problem.


-- 
Paul.

http://logicsquad.net/


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Timestamps and PostgreSQL (From: Paul Hoadley <email@hidden>)
 >Re: Timestamps and PostgreSQL (From: Chuck Hill <email@hidden>)
 >Re: Timestamps and PostgreSQL (From: Paul Hoadley <email@hidden>)
 >Re: Timestamps and PostgreSQL (From: Paul Hoadley <email@hidden>)
 >Re: Timestamps and PostgreSQL (From: Chuck Hill <email@hidden>)
 >Re: Timestamps and PostgreSQL (From: Paul Hoadley <email@hidden>)
 >Re: Timestamps and PostgreSQL (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Timestamps and PostgreSQL
  • Next by Date: Re: Timestamps and PostgreSQL
  • Previous by thread: Re: Timestamps and PostgreSQL
  • Next by thread: Re: Timestamps and PostgreSQL
  • Index(es):
    • Date
    • Thread