Here's a silly issue but it took me quite some time to figure out.
So if you are in China and use Asia/Shanghai as your system timezone, when you do "show variables like "%time_zone%";" in the database you will see the system_time_zone is set to CST (China standard time).
But appearently in OSticket, CST is interpreted as America/Chicago timezone - I'm guessing Central Standard Time of U.S.? This caused all my ticket time to be hours ahead of the real time in China.
I changed the system timezone to Asia/HongKong (which is the same +8:00 as Asia/Shanghai) and the timezone in the DB changed to HKT, and this is interpreted correctly without any issues.
Versions: osTicket 1.14.1 MariaDB 10.4.11 php 4.2.24

Not something that needs to be fixed urgently, but could be painful if you don't know what went wrong...

Thanks,
C

@ChuckZ

Yes, CST is considered Central Standard Time thanks to us being American devs lol I think we will need to set China Standard Time’s abbreviation to something other than CST in the code so it’s interpreted correctly. Thanks for the report and we will look into this.

Cheers.

4 months later

i have config linux, mysql timezone as HKT, but in osticket still display wrong date (America/Chicago). how to setup it as china stand timezone?

@jianfzhu

Set it to an actual timezone and not an abbreviation. (eg. Asia/Hong_Kong, Asia/Tokyo, etc.)

Cheers.

    a year later

    KevinTheJedi

    I have the same problem but i dont understand where is that i should change it. Is it somewhere on osticket code? Im really lost here.
    I found this timezone trying to fix the session time expires almost instantly sometimes, could this be the problem? I've been looking on how to fix for weeks.

    @ncrypto

    Depends on what timezone you are talking about. Is it osTicket System Timezone, PHP Timezone, MySQL Timezone, Webserver Timezone?

    Cheers.

    2 years later

    If you are getting error for database

    sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
    default-time-zone = "+05:30"
    sudo service mysql restart

    Write a Reply...