I pride myself on setting the bar low. :-D

Dave

On Jan 22, 2010, at 3:28 PM, Simon wrote:

> I love these kind of posts. They make me feel that all those hundreds of 
> posts that i've done of a similar ilk aren't so bad after all :-). My 
> colleagues laugh at me because my posts like this are nearly always - in fact 
> **always** - in the early hours of the morning when i've been doing one of 
> those black-belt sessions.
> 
> i find red bull is the answer.
> 
> Simon
> 
> 2010/1/22 David Avendasora <[email protected]>
> Yeah, so... um... see... if you tell EOF that you only want a Date (valueType 
> = D) then it will strip the date off when it is read from the DB.
> 
> Whoda thunk?
> 
> But in my defense, isn't it odd that it doesn't strip it off when saving?
> 
> Anyway, the solution  was very politely pointed out to be easily found here: 
> http://en.wikibooks.org/wiki/WebObjects/EOF/Modeling/Common_Pitfalls_and_Troubleshooting
> 
> After 6 years of WO, you'd think I'd be past the "Common Pitfalls." I look 
> forward to asking about Vertical Inheritance and deferred constraints 
> tomorrow.
> 
> Dave
> 
> 
> 
> On Jan 22, 2010, at 2:28 PM, David Avendasora wrote:
> 
> >
> > On Jan 22, 2010, at 2:16 PM, Chuck Hill wrote:
> >
> >>
> >> On Jan 22, 2010, at 11:12 AM, David Avendasora wrote:
> >>
> >>> Hi all,
> >>>
> >>> I have a component that allows the user to modify a date field. The 
> >>> modification works just fine and the date field is changed in the 
> >>> database.
> >>>
> >>> The problem is that no matter what I do, the time is always displayed as 
> >>> the server's idea of midnight (GMT-5:00), no matter what the value is in 
> >>> the DB. If I don't use a formatter, I still get the same result. For 
> >>> example
> >>>
> >>> Database: 01/20/2010 01:00:00
> >>> Form Field with Formatter: 01/20/2010 12:00
> >>> Form Field without Formatter: 1/20/2010 05:00
> >>>
> >>> Here's the details:
> >>> WO 5.4.3
> >>> WOnder: 10544 (including EROraclePlugin)
> >>> Oracle
> >>>
> >>> What would cause the time component to be stripped from the date before 
> >>> the formatter even gets to it?
> >>
> >>
> >> Magic?
> >>
> >> What is the column type in the database?  What is the value type in the 
> >> model?  Do you have it set to some sort of Date Only?  The wrong prototype 
> >> maybe?
> >
> > Doh. I knew I was forgetting "some" of the important details... :-)
> >
> > DB Info:
> > DATA_TYPE:  DATE
> > DATA_LENGTH:  7
> >
> > Model Info:
> > Prototype: EOJDBCOraclePrototypes date
> > Datatype: Date
> > External Type: Date
> > Class: com.webobjects.foundation.NSTimestamp
> > Server Timezone: (not selected)
> >
> > Actual .plist contents:
> >        {
> >            allowsNull = Y;
> >            columnName = ENDDATE;
> >            name = endDate;
> >            prototypeName = date;
> >            valueType = D;
> >        },
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Webobjects-dev mailing list      ([email protected])
> > Help/Unsubscribe/Update your Subscription:
> > http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
> >
> > This email sent to [email protected]
> >
> >
> 
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk
> 
> This email sent to [email protected]
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to