• 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: useDaylightTime() ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: useDaylightTime() ??


  • Subject: Re: useDaylightTime() ??
  • From: Ramsey Gurley <email@hidden>
  • Date: Thu, 16 Aug 2012 10:35:35 -0700

If using postgres, you need to set the time zone before the driver loads as well. Something like this in your application class should do

public class Application extends ERXApplication {
private static Logger log = Logger.getLogger(Application.class);

static {
// Set default time zones
TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
NSTimeZone.setDefaultTimeZone(NSTimeZone.getGMT());
}

public static void main(String argv[]) {
ERXApplication.main(argv, Application.class);
}

Ramsey


On Aug 16, 2012, at 10:17 AM, WebObjects TORAcom wrote:

Hi Jesse,

The problem we got with postgresql was in the period of time day light time in U.S. begins because in Mexico begins later.

We found the datetimes stored in our database with a one hour offset during that period, once daylight begins in Mexico everything gets normal . The server timezone was correct (America / Mexico City) but for one reason time zone in postgres was Chicago (or something else).

I am not sure if this is your case.

Hope this helps.


On 16/08/2012, at 11:27, Jesse Tayler <email@hidden> wrote:


If my app output logs report the correct time, which they do:

Aug 16 12:21:17 WOMan[2002] DEBUG NSLog  -  === Commit Internal Transaction

then, WO / Java have a correct timezone too.

therefore, this must be mysql?



On Aug 16, 2012, at 12:04 PM, Jesse Tayler <email@hidden> wrote:

oh, that might be the trouble -- I didn't think about the database encoding.

I'm using mysql, but I checked the db properties and found UTC?

My server is EDT, or easter with daylight savings, for NYC. Unix reports Thu Aug 16 12:03:04 EDT 2012

Should this be set to EDT? UTC is GMT right? That would be more like 8 hours off, no?

Anyone know how Mysql should get setup or if this is ok?

thanks!

<Screen Shot 2012-08-16 at 11.59.39 AM.png>



 
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: 
 >useDaylightTime() ?? (From: Jesse Tayler <email@hidden>)
 >Re: useDaylightTime() ?? (From: WebObjects TORAcom <email@hidden>)
 >Re: useDaylightTime() ?? (From: Jesse Tayler <email@hidden>)
 >Re: useDaylightTime() ?? (From: WebObjects TORAcom <email@hidden>)

  • Prev by Date: Re: Guidance on how to create a framework for the application models
  • Next by Date: Re: Has anyone installed the new Oracle JDK7 for Mac yet?
  • Previous by thread: Re: useDaylightTime() ??
  • Next by thread: Re: useDaylightTime() ??
  • Index(es):
    • Date
    • Thread