Date but has type string?

Status
Not open for further replies.

693840

Banned - Inappropriate behavior
Joined
Aug 4, 2013
Messages
3,593
Reaction score
8,924
I have this code...

Code:
    date_default_timezone_set('Europe/London');
    $date = date('Y-d-m h:i:s', time());

    echo gettype($date);

...and the type of $date keeps appearing as string, and I have no clue how.

Does anyone have an idea? My dates keep appearing as 0000-00-00 00:00:00 in the database.
 
Status
Not open for further replies.
Back
Top