1.1.2 time bug
-
I installed 1.1.1 on debian 7.5 and I had not the time problems I mention here [url]http://fogproject.org/forum/threads/time-problem.10961/[/url] (I have to schedule in utc (3hours earlier) to start a task the time I want).
Then I upgraded to 1.1.2 and immediately the problem begun. I removed 1.1.2 and re-installed 1.1.1 on the same system and it is OK. Any solution?
Thank you
-
No one else has this problem with 1.1.2? I can not upgrade because of this…
-
You could try fixing it.
Go to /var/www/fog/commons/system.php
Here’s what’s important for you:
[php] 25 if (ini_get(‘date.timezone’))
26 date_default_timezone_set(date_default_timezone_get());
27 else
28 date_default_timezone_set(‘UTC’);[/php]Something is telling me that your date.timezone setting is not properly set.
-
Thank you, but 1.1.1 works perfectly with not altering any file from default. Now I have 1.1.1 and it works perfectly. If I upgrade to 1.1.2, then comes the problem. Is it a 1.1.2 bug?
-
I’m asking you these questions, not because I don’t believe you, but because the change in this file happened because it was posing other problems in 1.1.1.
The lines I just showed “fix” those weird issues. My guess is this is where your problem is.
php was setting defaults and probably spamming your error.log file with "you are required to set the date.timezone setting in php.ini as relying on your systems timezone…* kinds of messages.
I’ve fixed it so this doesn’t happen, and the lines I showed you are how it was fixed. My best guess, based on this, is this is the issue you’re seeing. The timezone is setting to ‘UTC’ based on your hardware clock. So if your hardware clock is saying it’s 2000, but real utc time is 1200, you can see the descrepency.
-
Here are those lines:
[CODE] if (ini_get(‘date.timezone’))
date_default_timezone_set(date_default_timezone_get());
else
date_default_timezone_set(‘UTC’);[/CODE]Bios is set to UTC. Should I change something in the lines above?
[CODE]# hwclock --debug
hwclock from util-linux 2.20.1
Using /dev interface to clock.
Last drift adjustment done at 1404282060 seconds after 1969
Last calibration done at 1404282060 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick…
…got clock tick
Time read from Hardware Clock: 2014/07/02 06:47:09
Hw clock time : 2014/07/02 06:47:09 = 1404283629 seconds since 1969
Wed 02 Jul 2014 09:47:09 AM EEST -0.688132 seconds
[/CODE]PC time is 09:47 now.
I also have [CODE]date.timezone = “Europe/Athens”[/CODE]
Thank you!
Edit: With
[CODE] if (ini_get(‘date.timezone’))
date_default_timezone_set(date_default_timezone_get());
else
date_default_timezone_set(‘localtime’);[/CODE] times are correct (but why are times correct since my hardware clock is set to utc? ). Is this setting correct? Should I leave it like this?