Notification email - wrong time
Moderator: mkoch227
Notification email - wrong time
Script URL: pomoc.solidexpert.com
Version of script: 2.4.1
Hosting company: GoDaddy
URL of phpinfo.php: http://www.solidexpert.com/info.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution: timezone server
Write your message below:
I needed to add 9 hours to server time to get correct HESK time. All events in Hesk are recorded properly with correct local time. The problem is with notification emails. All are sent with doubled timediff value.
Eg. Server time: 01:00
Hesk time : 10:00 (my local time)
Notification email time signature: 19:00
Customers see it as e-mail from future, their spam rules often delete those emails at once. Problem is both for phpmail and smtp
Is there a possibility to change some line of code to fix this? I see no chance to modify godaddy.com php.ini...
I understand that would be no problem if server time = hesk time (difference 0)
Version of script: 2.4.1
Hosting company: GoDaddy
URL of phpinfo.php: http://www.solidexpert.com/info.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution: timezone server
Write your message below:
I needed to add 9 hours to server time to get correct HESK time. All events in Hesk are recorded properly with correct local time. The problem is with notification emails. All are sent with doubled timediff value.
Eg. Server time: 01:00
Hesk time : 10:00 (my local time)
Notification email time signature: 19:00
Customers see it as e-mail from future, their spam rules often delete those emails at once. Problem is both for phpmail and smtp
Is there a possibility to change some line of code to fix this? I see no chance to modify godaddy.com php.ini...
I understand that would be no problem if server time = hesk time (difference 0)
Re: Notification email - wrong time
Ok. I have manage to edit php.ini file.
Now hesk time = server time, difference 0.
BUT all timestamps in hesk are moved -9 hours (despite good hesk time!). Is it a problem with mySQL date records? There is for sure no option to edit timezone for mysql on GoDaddy servers...
Please help;)
Now hesk time = server time, difference 0.
BUT all timestamps in hesk are moved -9 hours (despite good hesk time!). Is it a problem with mySQL date records? There is for sure no option to edit timezone for mysql on GoDaddy servers...
Please help;)
Re: Notification email - wrong time
It's possible that their MySQL is set to a different time zone. I'm afraid I cannot help here.
However, emails shouldn't be blocked because of few hours time difference, SPAM filters should take in account that servers are in different time zones over the world.
However, emails shouldn't be blocked because of few hours time difference, SPAM filters should take in account that servers are in different time zones over the world.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Notification email - wrong time
Thanks for clearing things out!
I found a SQL statement for changing sql session timezone and I try to put it somewhere
Eg. in admin_ticket.php it works partially (change only last update date). This is strange.
I hoped for easy mods in admin_ticket.php and ticket.php
Is there a place to put this SQL statement that all dates collected from tables would be got in correct tomezone?
I found a SQL statement for changing sql session timezone and I try to put it somewhere
Eg. in admin_ticket.php it works partially (change only last update date). This is strange.
I hoped for easy mods in admin_ticket.php and ticket.php
Code: Select all
$res = hesk_dbQuery("SET time_zone = `Europe/Warsaw`");
Re: Notification email - wrong time
You can try adding it just above this code in inc/database.inc.php
Code: Select all
return $hesk_db_link;
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Notification email - wrong time
I am having a similar problem.
haken,
Did you have any success setting the Time Zone in the SQL Statement?
I added:
to database.inc.php, which sets it to PST, which is my local Time Zone.
This initially seemed to work, now all the timestamps in the tickets were showing correctly as PST. I then wondered what would happen for customers logging Tickets from other Time Zones. On a Test machine, I set the System Timezone to CST (-6:00), and added some replies to a ticket and found that the timestamps always showed as PST even for the computer set to CST. So, the way I have it now is:
Emails seems to show correct time
Timestamps in the client also show the time in PST, regardless of the timezone of the client.
Shouldn't the client always show the timestamps of the user's local Time Zone, regardless of the Time Zone of the database?
Any ideas?
Thanks,
haken,
Did you have any success setting the Time Zone in the SQL Statement?
I added:
Code: Select all
$res = hesk_dbQuery("SET time_zone = '-8:00';");
This initially seemed to work, now all the timestamps in the tickets were showing correctly as PST. I then wondered what would happen for customers logging Tickets from other Time Zones. On a Test machine, I set the System Timezone to CST (-6:00), and added some replies to a ticket and found that the timestamps always showed as PST even for the computer set to CST. So, the way I have it now is:
Emails seems to show correct time
Timestamps in the client also show the time in PST, regardless of the timezone of the client.
Shouldn't the client always show the timestamps of the user's local Time Zone, regardless of the Time Zone of the database?
Any ideas?
Thanks,
Victor Ewert
http://www.ewert-technologies.ca
http://www.ewert-technologies.ca
Re: Notification email - wrong time
The timestamp in HESK is always the server timestamp (corrected for example to the timezone your company is in if you use the adjust time settings), never client's.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Notification email - wrong time
Thanks, klemen for the quick reply.
So, just so I'm clear. If my server is in EST, and a Customer submits a ticket in PST, when the customer views their ticket in their browser, all timestamps will be displayed in EST.
I guess what I expected was, that the database would store the timestamp in some 'Time Zone neutral' format and then the browser would display the timestamps in the user's/browser's local Time Zone. I guess the issue with that is, trying to determine the Time Zone of the browser client.
So, just so I'm clear. If my server is in EST, and a Customer submits a ticket in PST, when the customer views their ticket in their browser, all timestamps will be displayed in EST.
I guess what I expected was, that the database would store the timestamp in some 'Time Zone neutral' format and then the browser would display the timestamps in the user's/browser's local Time Zone. I guess the issue with that is, trying to determine the Time Zone of the browser client.
Victor Ewert
http://www.ewert-technologies.ca
http://www.ewert-technologies.ca
Re: Notification email - wrong time
Exactly, in your example timestamp will be displayed in EST and yes, detecting timezone is indeed the issue here. If you have a system that requires users to login you can ask them what their timezone is, but Hesk was designed not to use any login hence there is no reliable way of detecting the timezone.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Re: Notification email - wrong time
OK, thanks. Now that I understand how it works, I can work around it.
Victor Ewert
http://www.ewert-technologies.ca
http://www.ewert-technologies.ca