Weird Date problem driving me crazy...
| From: | Boaz Yahav | Date: | Sun, 13 Jul 2003 12:00:20 +0000 |
| Subject: | Weird Date problem driving me crazy... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-154998@lists.php.net to get a copy of this message | ||
I have two date strings coming out from MySQL.
Both fields are defined as datetime.
When i come to print them like this :
Echo"<B>Ticket Opened</B> : " . date("l, F jS Y
H:i",$row->OpenDate) . "<BR>";
Echo"<B>Problem Start</B> : " . date("l, F jS Y
H:i",$row->ProblemStart) . "<BR>";
I get :
Ticket Opened : Sunday, July 13th 2003 13:37
Problem Start : Thursday, January 1st 1970 02:33
Notice that the 2nd date is wrong and it's some kind of default that the
function
returns. Only if i add strtotime() and only to the 2nd field do i get
the correct answer :
Ticket Opened : Sunday, July 13th 2003 13:37
Problem Start : Saturday, July 12th 2003 20:36
any idea?
Sincerely
berber
Visit http://www.weberdev.com/ Today!!!
To see where PHP might take you tomorrow.