Jump to content

how can I set the timezone in config.php?


gunter
 Share

Recommended Posts

How ist it possible to se the correct timezone in config.php?
It works for me only with the native php date_default_timezone_set():

/**
 * Installer: Time zone setting
 * 
 */
$config->timezone = 'UTC';
echo "<br>date:". date('m/d/Y h:i:s a', time());

$config->timezone = 'Europe/Vienna';
echo "<br>date:". date('m/d/Y h:i:s a', time());

date_default_timezone_set('Europe/Vienna');
echo "<br>date:". date('m/d/Y h:i:s a', time());

I´m getting this, the last line is correct

date:05/24/2021 09:17:58 am
date:05/24/2021 09:17:58 am
date:05/24/2021 11:17:58 am //<- yes this is my time!

 

Link to comment
Share on other sites

  • gunter changed the title to how can I set the timezone in config.php?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...