1

I'm checking time with the php (carbon). It gives me:

object(Carbon\Carbon)#16622 (3) {
  ["date"]=>
  string(26) "2017-11-23 02:51:30.000000"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(3) "UTC"
}

Also, I'm checking mysql timezone and time. It gives me:

mysql> SELECT @@system_time_zone;
+--------------------+
| @@system_time_zone |
+--------------------+
| UTC                |
+--------------------+
1 row in set (0.00 sec)

mysql> select now();
+---------------------+
| now()               |
+---------------------+
| 2017-11-22 21:49:27 |
+---------------------+
1 row in set (0.00 sec)

Same timezones, different time, hm. So, question is - what is the preferable way to fix this difference? And why this difference is happening?

Tasty
  • 76
  • 8

0 Answers0