Re: Date-Only NSTimestamps
Re: Date-Only NSTimestamps
- Subject: Re: Date-Only NSTimestamps
- From: Pierre Bernard <email@hidden>
- Date: Thu, 3 Jan 2008 01:30:47 +0100
On Jan 2, 2008, at 9:18 PM, Chuck Hill wrote:
There isn't any that I am aware of. I usually "normalize" these to
noon in the setXXXDate() methods.
I would do the same thing on a new project if I were _required_ to use
dates.
On past projects I normalized to midnight. Trouble is that time zone
support in WebObjects is BUGGY as hell. Actually it behaves just as
Java 1.3 behaved. Trouble is all other date classes and tools got
improved behavior in Java 1.4. Each time you pass an NSTimestamp to a
method taking an java.util.Date argument you introduce an error! BTW,
I seem to recall that WO 5.4 did go like halfway to deprecating
NSTimestamps. Haven't used 5.4 myself.
If I were free to chose my implementation I would be seriously tempted
writing my own "date-only" class mapping to a NUMBER column. Actually,
I often had to work with month-only dates. There it gets even more
tempting.
Pierre
- - -
Houdah Software s. à r. l.
http://www.houdah.com
HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend
_______________________________________________
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