php - Current timestamp is different from current date -


i have table.

+------------------+--------------+------+-----+-------------------+- | field            | type         | null | key | default           | +------------------+--------------+------+-----+-------------------+- | encoded_date     | timestamp    | no   |     | current_timestamp | | actual_date      | date         | no   |     | null              | +------------------+--------------+------+-----+-------------------+- 

my computer's date 5/14/2015 10:10am.. why when submit form, record being save

encoded date: 2015-05-13 18:59:03 

try setting timezone @ top of form page this:

<?php     //set time zone     date_default_timezone_set('america/new_york'); ?> 

you can find whatever timezone in here: http://php.net/manual/en/timezones.php


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -