• 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: joda LocalDateTime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: joda LocalDateTime


  • Subject: Re: joda LocalDateTime
  • From: John Huss <email@hidden>
  • Date: Fri, 15 Nov 2013 09:27:38 -0600

JDBC still relies on java.sql.Timestamp, etc, which uses the system's time zone when saving and loading data.  Usually the easiest solution is to set the default time zone to UTC by adding a VM argument -Duser.timezone=UTC

Then when you need to display date times you can choose a different time zone for display purposes explicitly.


On Thu, Nov 14, 2013 at 10:51 PM, Jeffrey Schmitz <email@hidden> wrote:
Hello List,
   A simple question about a time value (as if any quesiton about webobjects and time is simple :-)), I have a field I've defined using the jodaLocalDateTime prototype.  I was assuming that if I save the value 2013-11-14T12:00:00.000 to my EO, the database would save exactly that, using 12:00:00 for the time.  However when I go to the database, the actual time saved is 6:00:00, so obviously it is assuming the time I'm saving is in Greenwich time and converting it to Local time.  By the name, maybe that makes sense, but I was thinking LocalTime meant time zone free.

What makes this more maddening is that when I go to display the time from my EO, it displays it as 6:00:00, so in essence, it's doing the conversion on the save, but not on the retrieve.  What am I missing here?

Thanks!
Jeff

 _______________________________________________
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

 _______________________________________________
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

  • Follow-Ups:
    • Re: joda LocalDateTime
      • From: Samuel Pelletier <email@hidden>
References: 
 >joda LocalDateTime (From: Jeffrey Schmitz <email@hidden>)

  • Prev by Date: Re: structure opinions
  • Next by Date: Re: structure opinions
  • Previous by thread: joda LocalDateTime
  • Next by thread: Re: joda LocalDateTime
  • Index(es):
    • Date
    • Thread