Hi, I'm not able to set correct time. What am I doing wrong?OS: TurnKey Linux 13.0 / Debian 7.4 Wheezy, Proxmox OpenVZ CTosTicket version: v1.8.2-dpr-11-gc754f04osTicket System Settings and Preferences: GMT 1.0, observe daylight savingsresult: 10 but it may be 11...# ls -l /etc/localtimelrwxrwxrwx 1 root root 33 Apr 16 10 /etc/localtime -> /usr/share/zoneinfo/Europe/Prague# cat /etc/timezoneEurope/Prague# echo "system: `date '+%H:%M'`"system: 11# echo '<?php echo "php: ".date("H")."\n";?>'|phpphp: 11

I'm just not sure what time setting at your command prompt have to do with time settings inside the web application. I'd check your users accounts time zone setting first.Staff panel -> My Preferences -> Time Zone:And then I would check Admin panel -> Settings -> Default Time Zone:And then I would check your php.ini where the time zone could be hard coded.

6 days later

hi @[deleted], thank for you reply.Commnad propt commands are for to be sure that my system is running in local time and my system timezone is set. As you can see, the last command is the php script and that is the proof of correct php configuration.AFAIK setting default timezone is enough for this and I'd like to set default timezone settings (/scp/settings.php?t=system) instead of user/staf preferences (/scp/profile.php) but in this case, user has been set from default and I checked it twice.  As you can see on my first post, I've already set GMT+1 inc. daylight saving (result may be +2 hours).... and no hardcoded tz in the ini

Problem is within the TZ config because regardless of the value selected $config is still empty.referring to: /include/staff/settings-system.inc.php

Do you have Daylight Saving: checked?

6 days later

yes, as I said in my 1st and 2nd post, daylight saving is enabled (checked) and $config is 1. I have problem with tz_offset but not with enable_daylight_saving. Thanks

Please check the items mentioned in:http://www.forum.osticket.com/d/discussion//issue-setting-ticket-system-time#latest

7 days later

Check the following:1. your PHP.ini for your set time zone.2. My Preferences -> Time Zone3. Admin panel -> Settings -> Default Time Zone4. Admin panel -> Staff -> each staff -> Staff's Time Zone

1. not setini_get('date.timezone') returns "" 2. there is correct time ... blank4. same as point 2

2 years later

Hi @[deleted], after some time, I've decided to implement osTicket and I found the old issue again.edit: osTicket v1.9.14 (8b927a0)Staff panel -> My Preferences -> Time Zone ... this is correct, I've my GMT+1+DS TZ and $info is returning correct value which is resulting in correct timeAdmin panel > System settings -> TZ GMT+1, DS, but wrong time. Why? Because $config is not set at all. Just default_timezone_idUser page > Profile > TZ GMT+1, DS, wrong time. $info is not set, just timezone_idMy system time is correct, OS, PHP, MySQL timezones are ok. Good thing is that tickets are with correct time but I don't want to answer to questions of customers "Why is wrong time in my profile setting" and unfontunately our customers will ask :(   (same as I've to change the 'Please wait... it will take a second!' string because academicians can hold the stopwatch and complain about this... we know our people)

This thread is from May of 2014.Are you seriously still running 1.8.2?

nope, sorry I didn't mentioned the version ... v1.9.14 (8b927a0)

So then what is your actual problem since I quite sure that it is not the same as it was.

Yes, problem is the same. User Profile (/osticket/profile.php) and System Settings (/osticket/scp/settings.php) is showing the wrong time (you may change the TZ as you want but time is still (local-tzOffset)+DS, in my case GMT+DS but I need (local-tzOffset)+tzOffset+DS ... it's $gmtime+null+ds instead of $gmtime+tzoffset+ds).Staff Profile (/osticket/scp/profile.php), all staff profiles and ticket time is correct. And as I said, problem is in variables which are not set (so returning null):/osticket/include/staff/settings-system.inc.php - $config/osticket/include/client/profile.inc.php - $infoPS: that part with GMT, local time, etc. is weird, but you probably know the source code ...Misc:() returns time()-date('Z')  ... which converts my local time into the GMT (because od 'Z') so I need to add the TZ offset back and it has to be stored in the tz_offset within $config or $info

Well since your so sure of what the problem is perhaps you should report the issue on github.https://github.com/osTicket/osTicket/issues/new

Write a Reply...