Re: Time field off by one hour after new build
Randy Wigginton <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hey, make sure you aren't getting bit by a mysql "feature" that will
auto-update the first timestamp field when anything in the record
changes. Try manually updating some data and then get the record
back, see if the time has changed.
On Oct 30, 2006, at 4:37 PM, PaulM wrote:
>
> Hello All,
>
> I've nearly completed my first WEbObjects applicationand have one
> glitch I
> can't figure out. I'm in development mode and during testing I
> create a new
> record that contains a "time created" field. I save the record at
> 9:01. On
> variuos pages all show the time as expected (9:01). I create
> several records
> minutes or more apart, each with the correct time. I look at the
> data in the
> DB with CocoaMySQL and the data is as expected (9:01).
>
> Later (5 minutes later) I make a new build. The "time created"
> field on all
> pages now shows exactly one hour later (10:01) than was seen
> previously. I
> look at the stored data with CocoaMySQL and the time is 9:01 as
> saved in the
> previous build .
>
>
> It's not a daylight savings thing for this problem was occuring two
> days
> before the change and is still occuring today
>
> What am I missing here? How can I fix it?
>
> Thank you,
>
> Paul
>
> ------------ here's details on anything I could find with the taime
> created
> field...
>
> In CocoaMySQL the settings are...
> field: time_created
> length:(nothing)
> type:time
> default: 00:00:00
>
> Variables in CocoaMySQL...
> time_zone: SYSTEM
>
> in EOModeler....
> name:timeCreated
> external type:TIME
> valueClass:NSTimestamp
> Column:time_created
> width:(blank)
> ValueClass:NSClendarDate
> V:T
>
>
>
> ------ various Java code
>
> public NSTimestamp timeCreated() {
> return (NSTimestamp)storedValueForKey("timeCreated");
> }
>
> public void setTimeCreated(NSTimestamp value) {
> takeStoredValueForKey(value, "timeCreated");
> }
>
>
>
> //---- Code chunk that saves the data
>
> public void awakeFromInsertion(EOEditingContext context) {
> super.awakeFromInsertion(context);
> if (timeCreated() == null) {
> setTimeCreated(new NSTimestamp());
> }
>
> }
> --
> View this message in context: http://www.nabble.com/Time-field-off-
> by-one-hour-after-new-build-tf2542283.html#a7083509
> Sent from the WebObjects-Dev mailing list archive at Nabble.com.
>
> _______________________________________________
> WebObjects-dev mailing list
> [email protected]
> http://www.omnigroup.com/mailman/listinfo/webobjects-dev