How to setup Time Zone in osTicket, which is very important to have your system work correctly. If the time zone is incorrect tickets get mixed up marked wrong data/time, SLA, etc.. So here are few places you can check to confirm your system is correctly setup. I am using an Ubuntu system other Linux system works similar path might be different. If your time shows incorrect you should also check to make sure you have installed the PHP Extensions “Intel” which effects the time you can check it at /scp/system.php. There at least 4 places you can set the time zone, I am listing it here, your settings may vary.
Option 1: from osTicket admin panel System Settings and Preferences
/scp/settings.php
Default settings: Locale Defaults
If you need to customize:
Option 2: via php.ini file
Search or in your file under Date and just uncomment date.timezone =
Put your time zone name after = America/New_York (This would be mine)
Timezone name list: https://www.php.net/manual/en/timezones.php
Sample php.ini file looks like
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =
Option 3: via MySQL directly on the database
To see what’s currently is:
mysql -u YourDataBaseUserName -p -e “SELECT NOW();”
To see your current timezone within mysql: use the following command:
mysql> select now();
or
SHOW VARIABLES LIKE ‘%time_zone%’;
or
SELECT @@GLOBAL.time_zone, @@SESSION.time_zone;
To set a time zone or a value: make sure to choose your own time zone:
SET time_zone = America/New_York;
or
SET GLOBAL time_zone = ‘+8:00’;
or
SET GLOBAL time_zone = ‘ America/New_York ‘;
or
SET @@global.time_zone = ‘+00:00’;
To configure the time zone in Ubuntu system:
sudo dpkg-reconfigure tzdata
Restart the server or you can restart Apache 2 and MySQL:
/etc/init.d/mysql restart
Option 4: Agent profile, which does not affect system-wide
osTicket Agent profile: Agent panel -> Profile -> Preferences -> Localization
That’s it, check the logs of PHP, web server and osTicket if you having any issues, that will give you some more clue.
Issues you might have:
Time issues: if Intel PHP Extension is not installed:
Once you installed Intel PHP extension then, restart your apache (your webserver) service, if everything goes well it should be fine: