0

I have a field createdAt in my Mysql Table which store timestamp.

While queries records i want to Set a particular Timezone:

for example: India Time Zone:

I tried below but it is not working:

mysql_query('SET time_zone ="Asia/Calcutta"');
Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119
Ashish Rathee
  • 449
  • 3
  • 16
  • 1
    ***Please [stop using `mysql_*` functions](http://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php).*** [These extensions](http://php.net/manual/en/migration70.removed-exts-sapis.php) have been removed in PHP 7. Learn about [prepared](http://en.wikipedia.org/wiki/Prepared_statement) statements for [PDO](http://php.net/manual/en/pdo.prepared-statements.php) and [MySQLi](http://php.net/manual/en/mysqli.quickstart.prepared-statements.php) and consider using PDO, [it's really pretty easy](http://jayblanchard.net/demystifying_php_pdo.html). – Jay Blanchard Dec 20 '16 at 15:06
  • `it is not working` Error messages? MySQL version? – Machavity Dec 20 '16 at 15:08

0 Answers0