How to set time_zone using PDO

Asked

Viewed 124 times

0

I have a connection using PDO what arrow the SET NAMES UTF8:

$options = [ PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES UTF8" ];

But I’d like to add the SET time_zone='America/Sao_Paulo'.But in every way I tried it I return an Exception!

  • The php time zone? the bank team is something else. date_default_timezone_set('America/Sao_Paulo');

  • is the time_zone setting via PDO on the connection itself!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.