# \[php\] date() trouble

**URL:** <https://forum.kirupa.com/t/php-date-trouble/179164>\
**Category:** programming\
**Created:** [February 17, 2006, 6:07am UTC](https://forum.kirupa.com/t/php-date-trouble/179164 "2006-02-17T06:07:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [February 17, 2006, 6:07am UTC](https://forum.kirupa.com/t/php-date-trouble/179164/1 "2006-02-17T06:07:49Z")

</div>

so i’m inserting dates into a db and for some reason, the date function isn’t pulling back the correct time. anyone ever had any problems with this?

my code is:

```php

$date = date( "Y-m-d H:m:s" );

```

i’m hoping that i’m off my rocker and missing something stupid.
