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

osticket "System Time" not correct goes 2 hours back

The Timezone in PHP and osticket is set to Europe/Berlin but the Time that will be shown in System Settings goes 2 hours back.
The interesting thing is, that the Time (create time) of new Tickets is correct, but if i print the Ticket the printed time in the Footer is 2 hour sooner as the opend time

image
image

Comments

  • You haven't mentioned your mysql datetime or server datetime.
  • edited October 26
    mysql runs on the same server (time_zone is set to SYSTEM) as osticket and the server time (Zone) is set correct (UTC+1)

    image
  • Can you please post all the information from Admin Panel -> Dashboard -> Information ?
  • Yes i can :)

    image
  • Oops!  I neglected to updated this!

    Yesterday one of the devs confirmed that this is happening when one prints.  He thinks that is has something to do with the language pack he's looking into it.
  • @ntozier

    He thinks that is has something to do with the language pack he's looking into it.
    I think you meant:
    He thinks that it has something to do with the time formatter for printing tickets. ;)
  • On the Reason that the System Tap also shows the false Time, it can't be only a problem with "time formatter" for printing tickets.
  • @LibertyX what is 'System Tap' and how is it incorrect?
  • edited October 30
    For the Ticket Print issue, Edit the file include/staff/templates/ticket-print.tmpl.php and change line 111 from:
    Format::daydatetime(Misc::gmtime())
    to:
    Format::daydatetime(Misc::dbtime())

    and line 120 from:
    Format::daydatetime(Misc::gmtime())
    to:
    Format::daydatetime(Misc::dbtime())

    Make these changes, re-test, and let me know if that fixes it for you. If so, I'll make a pull request to update the core codebase so that all future release include the fix. Cheers.
  • @KevinTheJedi

    This is what i mean with "System Tab" and as you see on the Picture the Time that will be shown in osticket System settings is 2 hours earlier but the Time Zone Settings are correct.

    image


  • edited October 31
    Hello @LibertyX,

    The times listed there (in System Tab) are not supposed to be correct as they are just placeholders to let you know what the time/date will look like across the system.

    Did you try the ticket print fix suggested by me above? Let me know if it works for you.

    Cheers.
  • by "placeholders" he means examples of what the formatted  time will display like, not the actual time.
Sign In or Register to comment.