1

php server time from echo date_default_timezone_get ( void ); function is this Asia/Karachi

And mysql time zone from SHOW VARIABLES LIKE '%time_zone' query is this system_time_zone : CST

now how can I change MysQl time zone to match with my php server time.

Due to this difference the php date() and mysql current_timestamp are giving different results.

A.M
  • 63
  • 11

2 Answers2

1
SET GLOBAL time_zone = 'Asia/Karachi';
Karthick Kumar
  • 2,349
  • 1
  • 17
  • 30
0

Try this in your database

SET time_zone = 'Asia/Karachi';
zzlalani
  • 22,960
  • 16
  • 44
  • 73