Convert date to gmt - php

Posted by adbox on Stack Overflow See other posts from Stack Overflow or by adbox
Published on 2010-05-08T23:17:55Z Indexed on 2010/05/08 23:28 UTC
Read the original article Hit count: 231

Filed under:

Hey Guys,

I am having a strange problem, maybe you can help:

I'm trying to convert a date to GMT time, and this is what I'm doing:

$date = '2010-05-27 23:02:01';
$gmt_date = gmdate('Y-m-d H:i:s', $date );

but the yield of $gmt_date is this: 1970-01-01 00:33:31

What am I doing wrong?

© Stack Overflow or respective owner

Related posts about php