PHP: 5.6MySQL: 10.1osTicket - 1.10.1I have a shared hosting server, I host two different osticket dump over there with different name and databases.1. helpdesk1.host.com   -> Time set asia/kolkata in setting and preferences. Here time is shows correct IST. 2. helpdesk2.host.com   -> Time set asia/kolkata in setting and preferences. Here time is not showing correct later 1 hour from current time.Don't know why please help me.Thanks in advanced. 

This sounds like the two systems have some different time zonesos time zone?mysql time zone?php time zone?

For both setups. PHP time zone is  asia/kolkatamysql timezone is GMT

Is your osTicket installed on same shared hosting server? Is the server time correct?System Settings and Preferences>Date and Time OptionsDefault Time Zone:About this osTicket Installation>date.timezone

@[deleted]First, populate your MySQL timezone tables (if not already populated):https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.htmlNext, set `@@system.time_zone` and `@@session.time_zone` to "Asia/Kolkata" specifically.Now retest and see if the time is correct.If that doesn't help then post the results of the following steps:#1$ mysql -u root -p -e "SELECT @@global.time_zone, @@session.time_zone;"#2(linux)$ timedatectl(windows)> Get-TimeZone#3Admin Panel > Dashboard > Information > PHP Settings > date.timezone#4Admin Panel > Settings > System > Default Time Zone#5Profile > Preferences > Time ZoneCheers.

5 days later

Thanks all its fixed now. I do changes in include/class.timezone.php 177         if ($TZ === 'GMT') {178             return 'Asia/Kolkata';179         }

Write a Reply...