• 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: datetime / timezone (mysql jdbc) issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: datetime / timezone (mysql jdbc) issues


  • Subject: Re: datetime / timezone (mysql jdbc) issues
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 10 Feb 2010 22:40:15 -0800


On Feb 10, 2010, at 10:37 PM, Lachlan Deck wrote:

On 11/02/2010, at 5:27 PM, Chuck Hill wrote:

On Feb 10, 2010, at 10:14 PM, Lachlan Deck wrote:

On 11/02/2010, at 5:10 PM, Chuck Hill wrote:

On Feb 10, 2010, at 9:49 PM, Lachlan Deck wrote:

I've been debugging a problem we've got where the fetched timestamp is 1 hour out for times that fall after (or close after) the date when day light savings comes off.

That seems pretty normal for Java where a day is 24 * 60 * 60 * 1000 milliseconds, not a day like we usually think of it. If I don't care about the time, I just set it to 12:00 noon. So when Java adjusts the time, it is 11AM or 1PM, but at least on the correct day. Is that what you are seeing? Or am I misunderstanding the problem?

Yes. This is a timestamp / datetime (not a date only value).

The correct value should be 4pm Sydney time. But for this last one it's 5pm.

Are they all consistently on one side or the other of the DST boundary? Is this last one different? Does it matter which one is the last? Is the last always wrong regardless?

It's not random. The last one happens to be just after the time when daylight savings ends.


I'll try again :)
A list of records in the database with a field called 'endTimestamp' all have a value where their time-part == 4pm Sydney time. Once fetched, one of them is wrong.

Got it that time. Unless that one is in a different DST vs non-DST that is just plain crazy!

I've finally found the problem. It's the toy again[1] :)

So these connection params make it work:
...&zeroDateTimeBehavior = convertToNull &useGmtMillisForDatetimes =false&useTimezone=true&serverTimezone=Australia/ Sydney&useLegacyDatetimeCode=false


The main difference is whether or not to useGmtMillisForDatetimes. With a previous jconnector version there was a bug where it used the local timezone regardless and this was necessary... now that this has been /fixed/ this new issue came up. Fun. At least this time it should be good for some time to come.

Ugh. Why they don't just have a parameter called doTheRightThingAlready=true is beyond me :)


That is probably in the next version.  :-P


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects








_______________________________________________
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: 
 >datetime / timezone (mysql jdbc) issues (From: Lachlan Deck <email@hidden>)
 >Re: datetime / timezone (mysql jdbc) issues (From: Chuck Hill <email@hidden>)
 >Re: datetime / timezone (mysql jdbc) issues (From: Lachlan Deck <email@hidden>)
 >Re: datetime / timezone (mysql jdbc) issues (From: Chuck Hill <email@hidden>)
 >Re: datetime / timezone (mysql jdbc) issues (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: datetime / timezone (mysql jdbc) issues
  • Next by Date: Re: datetime / timezone (mysql jdbc) issues
  • Previous by thread: Re: datetime / timezone (mysql jdbc) issues
  • Next by thread: Re: datetime / timezone (mysql jdbc) issues
  • Index(es):
    • Date
    • Thread