Child pages
  • Adjust Timezone on Your Shared Host
Skip to end of metadata
Go to start of metadata

If you have your site hosted on shared hosting on a server located in different time zone you have to change it to fit in with your audience.

Simply create php.ini file in your web root directory and add this record (substitute your timezone for "Europe/Belgrade"):

date.timezone = "Europe/Belgrade"

You can test date and time with:

<?php
 echo date('d-m-Y H:i:s');
?>

Check the list of supported timezones at:http://php.net/manual/en/timezones.php

Timezone also MUST be set in MySQL because when creating content Newscoop usually reads date and time from the MySQL database engine.

To do it just use this easy workaround. Add following line in newscoop_dir/db_connect.php, line 17 (after line $g_ado_db->Execute("SET NAMES 'utf8'"); ) :

$g_ado_db->Execute("SET time_zone = '+1:00'");

In example we used +1:00 for CET. Adjust it for your time zone.

  • No labels