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

[resolved] OSticket 1.9.14 Daylight Savings time.

My tickets say an hour early to what actually time is. I see there have been a few tickets open about OSticket and the times being wrong.  I have read what I could find and tried their fixes with no luck.
Here is what I have checked:
PHP.ini>date.timezone = America/Chicago
osticket>admin panel>Default Time Zone GMT -6.0 - Central Time (US & Canada), Mexico City
osticket>admin panel>Agents>Default Time Zone GMT -6.0 - Central Time (US & Canada), Mexico City
osticket>my preferences>Default Time Zone GMT -6.0 - Central Time (US & Canada), Mexico City

Every setting reflects my time zone.  Selecting or Deselecting "Observe Daylight saving" has no effect.  The time doesn't change.  I am not sure where else to look, any help would be apreciated.

«1

Comments

  • Server OS timezone?
    PHP timezone?
    MySQL Timezone?
  • Server OS Timezone: (UTC -06:00) Central Time (US & Canada)
    PHP Timezone: America/Chicago
    MySQL Timezone: Unknown and perhaps where my issue is.  I don't know how to check that.
  • MySQL timezone -06:00 still have the error of everything being an hour off.
  • From the command line run a command that shows the system time. On Linux machines its:
    $ date
    Also run the following to get MySQL's time:
    $ mysql -u root -p -e "SELECT NOW(),CURDATE(),CURTIME();"
    Please post the results of these two commands once done.
  • cmd> time The Current time is: 11:20:04.54 (Which is correct)
    Mysql shows correct current date but wrong current time the time is an hour behind.  Which doesnt make sense because the GUI for MySQL shows -06:00 for central time. Unless something else needs to be here.

  • What operating system are you using?
  • Windows Server 2012R2  I have tried changing the time via the select now(); command see screen shot, no change happened. '
    Capture.PNG
    317 x 240 - 5K
  • edited March 28
    Yea that won't work...go to this website and scroll down to Populating the Time Zone Tables. Look for the Windows instructions. Once finished, log in to MySQL and run > SET GLOBAL time_zone = 'America/Chicago';. After this restart the server and you should get the correct time when running NOW();. Let me know how this goes!
  • Windows instructions start where it says "If your system is one that has no zoneinfo database (for example, Windows),".
  • Okay, I downloaded the files (timezone_2017b_posix.zip - POSIX standard) and shut down mysql service then moved files into the data folder, started back up the service and ran the command.  I receive the following error.  Error 1298 (HY000): Unknown or incorrect time zone: 'America/Chicago'
    Now I have verified that is the correct zone, am now at a loss again.
  • That sounds like it did not install right. Make sure you downloaded the right files for your version. Also try reinstalling the mysql files, log in to MySQL, and run > SET GLOBAL time_zone = 'America/Chicago';
    before restarting the service.
  • Its listed as 5.6 and below for the files i downloaded.  We use 5.5  With the service stopped you cannot log into it and run that command.
    What I have done
    Shut down MySQL
    Moved extracted files to the data folder
    Tried to loggin to MySQL through command while service was shut down and given an unable to connect error
    Restarted service
    Logged in and ran command and get error 1298 (hy000) 
  • This sounds like the files still aren't where they are supposed to be. Go to this SO question and look at the top answer. Maybe this will help?
  • YOU SIR ARE THE MAN! That was it the ProgramData folder instead of Program Files.  Now all time zones match up and osticket has the correct time. 

    -Cheers
  • Well I got a little excited too early.  I still had the OS times as Easter -05:00 which is why it was working.  When I revert back to Central time its still an hour off

  • Youre still the man though Kevin, it finally started accepting "America/Chicago"

  • So to recap
    PHP.ini: America/Chicago
    OS Time: (UTC -06:00) Central time (US & Canada)
    MySQL: America Chicago reflecting same time as server now

    OS TIME: An hour off still.
  • Screen shots to show the above settings as being set.

    php.PNG
    1433 x 758 - 34K
    OS_MySQL.PNG
    1191 x 556 - 55K
  • Under Admin Panel > Settings > System you have Observe daylight savings checked and My Preferences > Observe daylight savings checked as well? These both checked and everything you've done should fix this issue.
  • Yes, they are checked see attached. First is my settings, second is system settings.
    My Preferences.PNG
    949 x 232 - 28K
    system settings.PNG
    965 x 253 - 21K
  • Doesn't make a difference if I check or uncheck the daylight savings box the time doesnt change.
  • Do I need to restart the web server after making the changes to MySQL or is there something I need to do with osticket for it to update?
  • Hmmm...that's strange...you should be seeing an hour difference between checking and unchecking the box in your preferences. Have you tried restarting Apache to make sure all changes were applied?
  • Im being told our osticket is on IIS not Apache.
  • I can restart the webserver itself if need be
  • You should be able to restart IIS in the IIS control panel (ie you do not have to restart the webserver.... just restart the software)..  I would try restarting the site first and see if that does it... but I think that it has to be IIS itself..
  • My bad (forgot you're Windows)! Restart IIS and see if that helps. With PHP time, server time and MySQL time all being the same osTicket should be working correctly.
  • I restarted the server and still an hour off with no change to the time being an hour off.  Checking and unchecking the box has no change.
  • Also, for giggles, I restarted the IIS with the same result 
This discussion has been closed.