Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Time of ticket creation wrong - now with images and in the right forum ...


I have been struggling with this for the last 2 days.

The problem is whenever I create a ticket via the web form creation page of osticket, the time of the ticket creation displayed in the tickets list page of osticket is one hour less than the real creation time.
For example one ticket created at 15:01 is displayed in osticket as having been created at 14:01.
I am using osticket V. 1.10 (901e5ea)
Apache/osticket and mysql are running on the same machine (Centos7).

I have confirmed in the osticket database table that the ticket is created with the correct hour. but it is displayed with one hour less in osticket.

I have configured osticket timezone correctly according to my location (Europe/Lisbon)


I have set mysql timezones also according to my location on my.cnf file and populated mysql timezone tables from my centos7 /usr/share/zoneinfo directory


the centos7 OS timezone is also configured to Europe/Lisbon


the agent profile in osticket is also configured to Europe/Lisbon


Apache / PHP also configured in httpd.conf and php.ini to the correct location:
- in httpd.conf added line
          SetEnv TZ Europe/Lisbon
- in php.ini

A PHP test file opened in a web browser with the command "echo date_default_timezone_get();"  gives this:


Something strange is in the osticket configuration (first image) because mysql timezone altough configured as Europe/Lisbon is being interpreted as Europe/Paris by osticket.
Another question is Daylight Saving Times. Maybe the question also relates to this, but now I dont see any option to deal with this in OSTicket altough in previous osticket versions we had an option to activate/deactivate DST.

And I think this misconfiguration is also no allowing me to get a lock on a ticket. With a Collision Avoidance Duration of 5 minutes I can never answer a ticket because it gives the error "This action requires a lock. Please try again".
With a Collision Avoidance Duration bigger than 60 minutes then I can answer ticket.

Do not know what else can I try/change.
Maybe I am missing something obvious but I am out of ideas.

Any help would be appreciated

Thank you very much



  • Hi,
    For the last two days I have been reading up on all the solutions offered to solve this problem, trying everything offered to fix this problem - I too was bumped to 'Asia/Riyadh' trying to use AST (Atlantic Standard Time).

    I have been able to solve my problem after I found this article: 

    Using the command line to change the timezone (and not selecting any country but the GMT offset) was all I needed.
    One weird result when I set my computer to GMT-4 using this procedure was that I ended up with system time actually being set to GMT+4... went back in and selected GMT+4 which resulted in correct time.
    OSTicket now displays Timezone as "-04 (Interpreted as America/Santo_Domingo)" - country is close enough to Aruba where I am, and the tickets are now stamped with the correct time (and match system clock).

    This solution may save you a lot of time tinkering and trying!
  • Likely you've now set your Real Time Clock, (RTC), the hardware clock on the server. Which in your initial post was almost an hour behind UTC. Most linux machines set it to UTC, so I think something inside PHP depends on that.
  • Hello,

    I have the same problem,

    date's tickets in db are correct, all timezone are correctly configured (system, mariadb, php, osTicket)
    but it is displayed with two hours less in osticket.

    I don't have rtc because the server is in LXC container and container don't have the right to access to rtc.

    Can you help me, please.
  • +1 ... same here
  • Hi Jaclerigo,

    Strangely I just ran across this issue myself whilst trying to setup a test instance using Vagrant.

    The vagrant OS image wasn't set for my timezone so I first found new test tickets times were completely off. I tried changing the timezone in the instance however whilst everything looked set correctly for system, mariadb, php, and osticket, I was still receiving the "Renew lock" problem when I tried to edit a ticket.

    I've just now configured Vagrant to set a timezone and rebuilt this instance, this time everything works ok.

    It is an odd one,  as I'm having trouble replicating the issue now. Perhaps it is something related to how the timezone is updated ?

    Perhaps there is something in edavelaar's post above that will help ?

  • I've ran into this problem again today. 

    I've noticed that setting the "Default Locale" to "Use Language Preference" in Admin -> Setting -> System and also setting "Preferred Locale" to "Use Language Preference" for the user I am logged in as in Profile -> Preferences helps somewhat.

    I still have this problem in some test instances I built a little while ago and have messed with a bunch. 

    My latest dev VM though which has 1.10.1 and a bunch of PRs is working spot on so it is certainly possible to have things set correctly.

    Is anyone else having this problem still ?  

  • edited March 1
    Hello I have still problem in this ,
    below every places my time zone is asia/kolkata

     timezone in my php.ini
     in admin panel ->setting ->system
     For every user/staff

    I have created one ticket my current time is 1 March 2018 3:40pm  in database it is same time but in osticket it is displayed as 1 March 2018 7:10pm

    Please help me for resolve this serious issue.
  • Try changing line 118 in include/mysqli.php from:

    return db_get_variable('system_time_zone', 'global');


    return db_get_variable('time_zone', 'global');
  • This is the solution, Thank You!
Sign In or Register to comment.