• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

1.1.2 time bug

Scheduled Pinned Locked Moved
FOG Problems
2
6
1.8k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H
    hariskar
    last edited by Jul 1, 2014, 8:58 AM

    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

    1 Reply Last reply Reply Quote 0
    • H
      hariskar
      last edited by Jul 1, 2014, 4:22 PM

      No one else has this problem with 1.1.2? I can not upgrade because of this…

      1 Reply Last reply Reply Quote 0
      • T
        Tom Elliott
        last edited by Jul 1, 2014, 4:25 PM

        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.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • H
          hariskar
          last edited by Jul 1, 2014, 4:26 PM

          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?

          1 Reply Last reply Reply Quote 0
          • T
            Tom Elliott
            last edited by Jul 1, 2014, 4:30 PM

            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.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • H
              hariskar
              last edited by Jul 2, 2014, 5:50 AM

              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?

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                3/6
                Last post

              153

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project