Answer the question
In order to leave comments, you need to log in
Date issue in Drupal 7?
Push in the right direction... The situation is this, there is a custom form on Drupal 7, after submitting it writes the results to the database. There are no problems with recording, but I can’t understand why the date and time of filling are not correctly formed when fetching from the database.
Date and time of filling out the form:
<?php
$сreated = REQUEST_TIME; //результат 1415194288, что соответствует 2014-11-05 16:31:28
?>
<?php
$dateCreated = format_date($task->created, 'custom', 'Y-m-d H:i:s O');
//результат 2014-11-05 17:31:28
?>
Answer the question
In order to leave comments, you need to log in
Probably the case is in the wrong time zone on the server, or the database, or in the application settings, or anywhere of the above.
habrahabr.ru/post/240937
Try to make a clean php script on the server and display the time, then from the database, and so you can cut off the culprit;)
make
it possible in mysql the date is not correct. I had a very similar problem, after changing the time 26/09
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question