Server Time Problem
Moderator: mkoch227
-
- Posts: 56
- Joined: Wed Sep 06, 2006 11:44 pm
Server Time Problem
Script URL:
Version of script: 4.2.1
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: server time
Write your message below:
Settings|Misc
Server time reads 19:00, when you enter the tab, regardless of the time of day
Version of script: 4.2.1
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: server time
Write your message below:
Settings|Misc
Server time reads 19:00, when you enter the tab, regardless of the time of day
Re: Server Time Problem
Have you tried refreshing the page?
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
-
- Posts: 56
- Joined: Wed Sep 06, 2006 11:44 pm
Re: Server Time Problem
Yes...Klemen wrote:Have you tried refreshing the page?
Same time displays each time I open HESK... if I just let it sit there the time does increment (if that helps)
Re: Server Time Problem
That's really a strange one.
1. Does it help if you clear your browser cache, close all browser Windows then try again?
2. What browser and Operating system (on PC, not server) are you using?
3. What is your "Time format:" setting in HESK > Settings > Misc tab
4. If you save this code as "test.php", upload to your server and open in browser, what does it say:
1. Does it help if you clear your browser cache, close all browser Windows then try again?
2. What browser and Operating system (on PC, not server) are you using?
3. What is your "Time format:" setting in HESK > Settings > Misc tab
4. If you save this code as "test.php", upload to your server and open in browser, what does it say:
Code: Select all
<?php
$tm = time();
$dt = date('Y-m-d H:i:s', $tm);
$server_time = date('H:i', strtotime($dt));
echo "Time 1: " . $tm . "<br />\n";
echo "Time 2: " . ($tm + 3600) . "<br />\n";
echo "Time 3: " . $dt . "<br />\n";
echo "Time 4: " . $server_time . "<br />\n";
?>
<script language="Javascript">
var server_time = "<?php echo $server_time; ?>";
var today = new Date();
document.write("Time 5: " + today + "<br />\n");
today.setHours(server_time.substr(0,server_time.indexOf(":")));
document.write("Time 6: " + today + "<br />\n");
today.setMinutes(server_time.substr(server_time.indexOf(":")+1));
document.write("Time 7: " + today + "<br />\n");
var h=today.getHours();
var m=today.getMinutes();
var s=today.getSeconds();
document.write("Time 8: " + h + ":" + m + ":" + s + "<br />\n");
</script>
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
-
- Posts: 56
- Joined: Wed Sep 06, 2006 11:44 pm
Re: Server Time Problem
(1) No
(2) FF... latest version, XP
(3) Time Format: m-d-Y H:i:s
(4)
Time 1: 1345489997
Time 2: 1345493597
Time 3: 2012-08-20 15:13:17
Time 4: 15:13
Time 5: Mon Aug 20 2012 15:13:11 GMT-0400 (Eastern Daylight Time)
Time 6: Mon Aug 20 2012 15:13:11 GMT-0400 (Eastern Daylight Time)
Time 7: Mon Aug 20 2012 15:13:11 GMT-0400 (Eastern Daylight Time)
Time 8: 15:13:11
(2) FF... latest version, XP
(3) Time Format: m-d-Y H:i:s
(4)
Time 1: 1345489997
Time 2: 1345493597
Time 3: 2012-08-20 15:13:17
Time 4: 15:13
Time 5: Mon Aug 20 2012 15:13:11 GMT-0400 (Eastern Daylight Time)
Time 6: Mon Aug 20 2012 15:13:11 GMT-0400 (Eastern Daylight Time)
Time 7: Mon Aug 20 2012 15:13:11 GMT-0400 (Eastern Daylight Time)
Time 8: 15:13:11
Re: Server Time Problem
This all looks fine so I see no reason why it shouldn't work in your HESK.
I just don't see a logical explanation. Have you been editing admin_settings.php file? Try uploading the original one again.
I just don't see a logical explanation. Have you been editing admin_settings.php file? Try uploading the original one again.
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
-
- Posts: 56
- Joined: Wed Sep 06, 2006 11:44 pm
Re: Server Time Problem
I have not done any work in the php files, now or ever!!Klemen wrote:This all looks fine so I see no reason why it shouldn't work in your HESK.
I just don't see a logical explanation. Have you been editing admin_settings.php file? Try uploading the original one again.
Uploaded 2.4.1 admin_settings.php... no change!
Re: Server Time Problem
If you are willing to give me access to your admin panel feel free to send me username/password for HESK admin in a PM.
Other than that I really have no idea what could be wrong here.
Other than that I really have no idea what could be wrong here.
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: Server Time Problem
Ha, I think I found the problem - the PHP "strtotime" function didn't work properly when time format was "m-d-Y H:i:s".
I changed it to "d-m-Y H:i:s" - switched d (day) and m (month) and it works correctly now.
This probably happens because of the default timezone setting on the server that uses "day month" format instead of "month day".
It's the first time I ever saw this error, thanks for giving me access so I was able to figure it out!
I changed it to "d-m-Y H:i:s" - switched d (day) and m (month) and it works correctly now.
This probably happens because of the default timezone setting on the server that uses "day month" format instead of "month day".
It's the first time I ever saw this error, thanks for giving me access so I was able to figure it out!
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
-
- Posts: 56
- Joined: Wed Sep 06, 2006 11:44 pm
Re: Server Time Problem
Back in August you figured out a somewhat related problem to what I am having now... getting these errors:
Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /homepages/43/d151159610/htdocs/kseh/inc/common.inc.php on line 966
Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /homepages/43/d151159610/htdocs/kseh/inc/common.inc.php on line 971
Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /homepages/43/d151159610/htdocs/kseh/admin/admin_settings.php on line 71
Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /homepages/43/d151159610/htdocs/kseh/admin/admin_settings.php on line 71
Your assistance would be appreciated
Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /homepages/43/d151159610/htdocs/kseh/inc/common.inc.php on line 966
Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /homepages/43/d151159610/htdocs/kseh/inc/common.inc.php on line 971
Strict Standards: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /homepages/43/d151159610/htdocs/kseh/admin/admin_settings.php on line 71
Strict Standards: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /homepages/43/d151159610/htdocs/kseh/admin/admin_settings.php on line 71
Your assistance would be appreciated
Re: Server Time Problem
It's a PHP configuration issue - you need to set a correct default date.timezone value in your php.ini file.
http://php.net/manual/en/datetime.configuration.php
http://php.net/manual/en/datetime.configuration.php
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
-
- Posts: 56
- Joined: Wed Sep 06, 2006 11:44 pm
Re: Server Time Problem
Interesting but perplexing....
The ONLY place I am getting these errors is on the Hesk admin page and on the Footer on the Hesk pages. The footer is used on ALL my pages and the Hesk admin page is the only one complaining.
The ONLY place I am getting these errors is on the Hesk admin page and on the Footer on the Hesk pages. The footer is used on ALL my pages and the Hesk admin page is the only one complaining.
Re: Server Time Problem
Perhaps your other pages don't use date functions?
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
-
- Posts: 56
- Joined: Wed Sep 06, 2006 11:44 pm
Re: Server Time Problem
The Footer contains a date function, same as used in the footer on the Hesk pages and ALL my other pages...Klemen wrote:Perhaps your other pages don't use date functions?
I will send this issue off to my ISP (1and1) and see if they messed with the php.ini file, I have not and would not know where to find it
-
- Posts: 56
- Joined: Wed Sep 06, 2006 11:44 pm
Re: Server Time Problem
The errors generated relate to the version of PHP being used. 1and1 is using 5.4.10.
If I force the version to 5.2/5.3, via an htaccess entry for Hesk only, the errors disappear and all works well...
If I force the version to 5.2/5.3, via an htaccess entry for Hesk only, the errors disappear and all works well...