cake-php@googlegroups.com
[Top] [All Lists]

Re: Timestamp values not returning the time

Subject: Re: Timestamp values not returning the time
From: cricket
Date: Tue, 21 Dec 2010 15:14:50 -0500
On Tue, Dec 21, 2010 at 3:01 PM, mikeottinger <mikeottinger@xxxxxxxxx> wrote:
>
> I'm seeing this value using a line like $this->log($created); I'm
> pretty certain it's more than just formatting because the output of
> the sorting looked wrong.

It's definitely formatting. A MySQL date column shouldn't look like
that. Something somewhere is formatting the date or you've got
formatted strings in the DB itself. Probably the reason the sorting is
wrong is that it's a string, not a date.

Check the DB directly (from terminal if possible). Use DESCRIBE to
check the table columns. If the dates all look good then check the
data Cake returns. Use die(debug($data)).

Also, what does the SQL query look like?

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

<Prev in Thread] Current Thread [Next in Thread>