About this osTicket Installation
Server Information
osTicket Version v1.15.1 (fe1d1f8) — v1.15.2 is available
Web Server Software Apache/2.4.37 (centos) OpenSSL/1.1.1c
MySQL Version 10.3.17

PHP Version 7.4.4

Centos TimeZone = Asia / Kolkata
PHP.ini timezone = Asia / Kolkata
Mysql timezone = Asia / Kolkata

OSTicket > Admin Settings > timezone = Asia / Kolkata
OSticket > User > Profile > timezone = Asia / Kolkata

Still, my tickets show 1 hour early time stamp.

Tickets received at 4PM shows received at 3pm

Database Information and Usage
Schema ostfm (localhost)
Schema Signature add628927ee030469f5d3272ebda1e16
Space Used 641.85 MiB
Space for Attachments 259.35 MiB
Timezone IST (Interpreted as Asia/Jerusalem)

I have read many posts on this topic - many recommend some minor code change and some recommend tweaks but those are all 2+ year old posts.

Is anyone else facing this issue?
How should I fix this?

I've asked the devs to take a look at this.

Okay, Let me know if you're dev needs remote access of my server to debug or need any information from my side. Happy to help

    ramrajone

    Yes, sorry I forgot to mention it. I have already tried changing to "system default", "Asia/Kolkata" (my timezone), but the issue continues to haunt me.

    After a bit of tweaking, the below setup show me India time, but as you can see, its a wrong setup.

    Admin Login > Settings > timezone = UTC
    Agent Login > Preferences > timezone = Europe/Athens

    Note: I have 2 separate installations of OSTicket on the same server & I have set up both of them as above

      ramrajone

      1. Linux servers automatically manage daylight saving.
      2. Yes, all PHP modules are installed & updated.
      3. I've had this issue with OSTicket for many years now.
      4. For some reasons beyond my understanding, if I set the timezone in OSTicket as Asia/Kolkata the delta is 2.5 hours. Hence I had to setup the timezone in OSticket to Europe/Athens

      I believe the issue is with the code which the developers need to fix & I believe this is a good starting point for the developers....

        If the developers fix the code to understand IST as Asia/Kolkata, this issue will be fixed.

        2 months later

        Yeap I am also facing the same problem ... Need a quick fix for this and hope for early resolution

          Facing the same issue.. In the DB,time is proper.. Issue is only with the displaying in the OSTICKET Frontend.

          @rsclmumbai @hemanthnalluri

          The problem is actually with PHP's native timezone_name_from_abbr() method. When passing 'IST' to this method it returns 'Asia/Jerusalem' like we see in all these cases. Seems like this needs to be addressed on their level. I can create a patch to temporarily return 'Asia/Kolkata' instead but this is only a bandaid instead of a permanent fix.

          Cheers.

            KevinTheJedi The problem is actually with PHP's native timezone_name_from_abbr() method. When passing 'IST' to this method it returns 'Asia/Jerusalem' like we see in all these cases. Seems like this needs to be addressed on their level. I can create a patch to temporarily return 'Asia/Kolkata' instead but this is only a bandaid instead of a permanent fix.

            @KevinTheJedi
            If you modify the code to:
            timezone_name_from_abbr($xxxx,$offset);
            It will work fine. I have tested this.

            KevinTheJedi
            Either the user will have to set the offset.

            Where is OST getting abbreviated timezone from?
            Can OST rely on full timezone instead of abbreviated tz?

            @rsclmumbai

            The abbreviated time zone is coming from MySQL (@@GLOBAL.system_time_zone).

            I will get back to you on the exact reason why we translate the abbreviations to full names.

            Cheers.

            For me, SELECT @@global.time_zone shows "SYSTEM" & not IST
            This brings me to the command echo date_default_timezone_get(); and it shows "Asia/Kolkata"

            I'm following this thread on stackoverflow:
            https://stackoverflow.com/questions/2934258/how-do-i-get-the-current-time-zone-of-mysql

            Would it be better to use the timezone selection by the user so get past this issue in the simplest possible way, without having to rely on external parties like MySQL or PHP etc?