Hello!I have a problem with the wrong time when somebody creates a ticket or leaves a comment in the ticket - it's like I have set UTC +4 in my OsTicket, but it is set UTC +3.The timezone set in osTicket is Europe/Moscow. The tzdata and date/time in my OS are right . See screenshots in attachment.How can I fix this?Thx

tzdata.png

my_acc_pref.png

about_osticket.png

sys_set_and_pref.png

osTicket default Timezone in settings?  Looks good..Agent Profile Timezone? Looks good.MySQL Timezone? not included..Server Timezone? not included.If everything matches, please take a look at this and add your info to the thread:https://github.com/osTicket/osTicket/issues/3654

11 days later

I have added a quick fix @ https://github.com/osTicket/osTicket/issues/3654 which might help you.

2 years later

ntozier

Is this still an ongoing bug?

All of a sudden my server is running on ZULU time and my tickets all say "In 7 hours", as in the future.

These are the things I checked, and they all look correct.

Osticket Settings:
Default Time Zone: America / Los Angeles

System Time:
Thu Jan 24 07:20:49 PST 2019

MYSQL Time: SYSTEM

Apache PHP.INI: date.timezone = "America/Los_Angeles"

Cli_php.ini: date.timezone = "America/Los_Angeles"

EDIT

Ok this is weird, I went into
Admin Panel --> Settings --> System
I switched "default Time Zone" to UTC and now the time is correct.
So basically the system somehow has UTC and PTC mixed up.

Im on the pacific, but when I have all the correct time zone parameters setup for the pacific time zone, it gives me zulu/UTC time.

When I switch it to UTC time it gives me the correct time for PTC.

Weird....

EDIT

Scratch that, it worked for me but not for agents in other states that I work with.

ntozier
Sorry:

Server Information
osTicket Version v1.10.4 (035fd0a) — Up to date
Web Server Software Apache
MySQL Version 5.7.25
PHP Version 5.6.38-2+ubuntu16.04.1+deb.sury.org+1
PHP Extensions
gdlib Used for image manipulation and PDF printing
imap Used for email fetching
xml XML API
xml-dom Used for HTML email processing
json Improves performance creating and processing JSON
mbstring Highly recommended for non western european language content
phar Highly recommended for plugins and language packs
intl Highly recommended for non western european language content
fileinfo Used to detect file types for uploads
APCu Improves overall performance
Zend Opcache Improves overall performance
PHP Settings
cgi.fix_pathinfo "1" is recommended if AJAX is not working
date.timezone America/Los_Angeles
Database Information and Usage
Schema osticket (localhost)
Schema Signature 98ad7d550c26ac44340150912296e673
Space Used 293.44 MiB
Space for Attachments 178.52 MiB
Timezone PST (Interpreted as America/Los_Angeles)

This is MySQL time.
and System time is fine too. I have no idea whats going on.

mysql> SELECT TIMEDIFF(NOW(), UTC_TIMESTAMP);
+--------------------------------+
| TIMEDIFF(NOW(), UTC_TIMESTAMP) |
+--------------------------------+
| -08:00:00 |
+--------------------------------+
1 row in set (0.00 sec)

mysql> SELECT @@global.time_zone, @@session.time_zone;
+--------------------+---------------------+
| @@global.time_zone | @@session.time_zone |
+--------------------+---------------------+
| SYSTEM | SYSTEM |
+--------------------+---------------------+
1 row in set (0.00 sec)

Yeah Im at a loss guys.
I've triple checked everything.
SQL time is right.
System time is right.
osTicket settings are right.
PHP.INI settings are right.

Everything is 7 hours ahead and I have no idea why.
I've restarted MySQL server, Apache2 server and even rebooted the entire server, nothing.
Times are right everywhere, except on osTicket.

    ramrajone

    Thanks for the attempt.

    I figured out the issue.

    My company purchased the "Reports" mod from http://www.software-mods

    This was the only other drastic change I had made to my server, so I went ahead and deleted it and completely removed it from my server.

    I restarted Apache2 and voila, the time-stamps returned to normal.

    I have reached out to Software-Mods and placed a ticket alerting them to this issue.

    So if you have any Time-Stamp issues and also have this mod installed; remove the mod completely from your server, don't just 'disable' it, and then restart your webserver and the timestamps should return to normal.

    I hope software-mods will fix this issue as we have already purchased this Mod and would really like to use it.

    My apologies for the issues everyone, I'm looking into it now. The problem doesn't exist in my current installations. Would anyone that has it installed and is having troubles be able to run the following and report back to me if it is the correct timezone you believe you should be using? The modreport.php file sets the timezone based on this lookup.

    SELECT value FROM ost_config WHERE key='default_timezone';

    Thank you,
    Scott

    PS: If one of you is Marcus J, I tried sending you an email just now and it was rejected as "User Unknown"

      scottro

      Thats me! Lol. I'm not sure why you got "user unknown", on the ticket I left in your support it has my correct work email.

      I can't test that on my production server at the moment because I'd have to re-install the mod and the timestamp issue may arise again.

      I will try installing it on a test server and I will run that command and see what it gives me.

      scottro

      Well I ran that command but got a syntax error not sure if you want me to run that mysql command or run your 'modreport.php' script.

      Regardless, I did check my database, including my production database, and in the "ost_config" table, my default_timezone is set correctly.

      Thanks, would it be possible to schedule a time we can put this back into your production (or test if you have one) environment and we can troubleshoot through the issue and get it resolved?

      12 days later

      Hey all,

      We've been able to resolve this for those experiencing the issue by commenting out (adding // in front) of the following lines within Reports/modreport.php

      6: date_default_timezone_set($zone);
      52: date_default_timezone_set($zone);

      to

      6: //date_default_timezone_set($zone);
      52: //date_default_timezone_set($zone);

      Thanks,
      Scott

      The download archive has now been updated as well.

      4 months later

      Hi scottro.

      Commenting out these two lines in modreport.php does the trick for me.

      We have 8.0.5 version. This bug is corrected in last update? How can I get it to upgrade my system?

      Thanks!

      I'm running the 8.2.0 version of the Reports Plugin. I do not know if there is a newer version.

      I check it every so often by re-downloading the product using the address in the email they sent me when I bought the product.

      As this is a third party plugin you would want to contact them by opening a ticket at www.software-mods/support if you have any questions.

      Closing old thread from 2017.

      Write a Reply...