# PHP/MySQL datetime weirdness

**URL:** <https://forum.kirupa.com/t/php-mysql-datetime-weirdness/197945>\
**Category:** programming\
**Created:** [August 21, 2006, 4:50am UTC](https://forum.kirupa.com/t/php-mysql-datetime-weirdness/197945 "2006-08-21T04:50:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobody](https://avatars.discourse-cdn.com/v4/letter/n/94ad74/32.png) [@nobody](https://forum.kirupa.com/u/nobody)\
**Post date:** [August 21, 2006, 4:50am UTC](https://forum.kirupa.com/t/php-mysql-datetime-weirdness/197945/1 "2006-08-21T04:50:19Z")

</div>

So I have a MySQL datetime record which is 2006-08-20 21:13:25

So I extract that data with PHP date function… something to the extent of date(“r”, $blah)

However it spits out this gem: Wed, 31 Dec 1969 16:33:26 -0800

Is there something I’m doing horribly wrong? I’m confused.
