Re: Time field off by one hour after new build

Paul Marvine <[email protected]>
Newsgroups gmane.comp.web.webobjects.devel
Message-ID <[email protected]>
Randy,

Thanks for your response. In the process of trying some different  
settings on the "time created" field (time, timestamp, date etc) I  
managed to corrupt all the data in the time created field so all  
times read 0000, 00, 00  00:00:00 (or something like that). It was  
only test data so I deleted all rows of the DB and started testing  
with an empty DB. Now the problem is gone. I don't know what was  
causing the problem, but it seems to work now. Thanks for your response.

Paul




On Oct 30, 2006, at 3:41 PM, Randy Wigginton wrote:

> 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
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.