• 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: Getting a wrong stored time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting a wrong stored time


  • Subject: Re: Getting a wrong stored time
  • From: Lachlan Deck <email@hidden>
  • Date: Sat, 11 Oct 2008 20:00:45 +1100

On 11/10/2008, at 8:57 AM, WebObjects wrote:

Hello, I dunno what im doing wrong.. but even if I change in the server timezone popup menu in EOModeler to GTM or whatever other timezone... it still keep saying etc/GMT at the end of the line.

You need to understand this: NSTimestamp is Etc/GMT (or UTC) only. It has, therefore, an absolute value - which is the Etc/GMT value. What you've set in the modeler is documented in EOAttribute's docs as follows:


"The handling of dates assumes by default that both the database server and the client application are running in the local time zone. You can alter the time zone that is assumed for the database server with the setServerTimeZone method. If you alter the server time zone, the adaptor automatically converts dates as they pass into and out of the server."

is it there where I should change it to be relative to GMT?..

As mentioned, you ought to use a formatter for display and input.

Here's a doc that might be useful:
http://developer.apple.com/documentation/LegacyTechnologies/WebObjects/WebObjects_5/Topics/ProgrammingTopics.2.html#pgfId =606100


On Oct 10, 2008, at 4:21 PM, Andrew Lindesay wrote:

Hello Gus;

Is your application server running in GMT. It is best to store your date/time data relative to GMT and then to convert it to a user's timezone using formatters in your user interface.

cheers.

Hello I have an attribute in a table called Start_Date_Time. which is a timestamp in the db schema.
in the EOModel I used a dateTime prototype and external type timestamp and data type Timestamp- NSTimestamp T
I have the following data in that attribute


-1-12-30 09:00:00 -0500
-1-12-30 12:00:00 -0500
-1-12-30 15:00:00 -0500
-1-12-30 18:00:00 -0500

After I fetch all those, and print them Im getting the following
1-01-01 14:00:00 Etc/GMT
1-01-01 17:00:00 Etc/GMT
1-01-01 20:00:00 Etc/GMT
1-01-01 23:00:00 Etc/GMT

As you can see the 3 hours diference between times still remains even in the weird output.

___ Andrew Lindesay www.lindesay.co.nz


_______________________________________________ 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

with regards, --

Lachlan Deck



_______________________________________________
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: 
 >Getting a wrong stored time (From: WebObjects <email@hidden>)
 >Re: Getting a wrong stored time (From: Andrew Lindesay <email@hidden>)
 >Re: Getting a wrong stored time (From: WebObjects <email@hidden>)

  • Prev by Date: Re: Nextstep... Oldie but goody
  • Next by Date: Fwd: upload via drag and drop
  • Previous by thread: Re: Getting a wrong stored time
  • Next by thread: Re: Getting a wrong stored time
  • Index(es):
    • Date
    • Thread