FOG time is far off



  • I’ll keep this one short and sweet. I don’t know what time zone Apache and everything else is in, but it’s definitely not mine. How do I change the time for FOG?

    For reference, Linux system time is correct.


  • Senior Developer

    [quote=“loosus456, post: 43874, member: 26317”]I don’t know how much of a pain in the ass it would be to implement, but could the time-zone settings be added either to the Web interface or at least the installation script? Manually editing system files just to correct the time zone seems a little much for the average user, but that’s just my opinion.[/quote]

    Web interface now has this support. It will use the UTC setting if no time is set. If php.ini timezone is set, it will use this as its timezone, otherwise it will use whatever you select.



  • I don’t know how much of a pain in the ass it would be to implement, but could the time-zone settings be added either to the Web interface or at least the installation script? Manually editing system files just to correct the time zone seems a little much for the average user, but that’s just my opinion.


  • Senior Developer

    For the FOG Services to work properly, only the nodes that are masters should require it. Other than that everything else should be good to go.



  • Do I have to change the time in the storage nodes as well or do they pull from the FOG Server?


  • Developer

    hehehehehe :rolleyes:


  • Testers

    Ok I obviously need more caffeine I should have seen that.


  • Senior Developer

    It’s already there


  • Testers

    This pops up a bit maybe add it to the wiki?


  • Developer

    For future reference:
    If your time is off please check your timezone located in these two files(ubuntu):
    [CODE]/etc/php5/apache2/php.ini
    /etc/php5/cli/php.ini[/CODE]

    Then restart apache2 and Fog Services (or reboot entire server):
    [CODE]sudo service apache2 restart
    sudo service FOGMulticastManager restart
    sudo service FOGTaskScheduler restart
    sudo service FOGImageReplicator restart
    sudo service FOGSnapinReplicator restart
    [/CODE]

    As a result of this “issue” coming up so often please see [url]http://fogproject.org/wiki/index.php/Time_off[/url] for other details.



  • Yep I did; but here is what actually worked for me. I had to restart the FOG services in order for the log to start updating with the correct time zone

    [CODE]boyan@fog4:/etc/php5/cli$ sudo service FOGScheduler restart

    • Restarting FOG Computer Imaging Solution: FOGScheduler [ OK ]
      boyan@fog4:/etc/php5/cli$ sudo service FOGMulticastManager restart
    • Restarting FOG Computer Imaging Solution: FOGMulticastManager [ OK ]
      boyan@fog4:/etc/php5/cli$ sudo service FOGImageReplicator restart
    • Restarting FOG Computer Imaging Solution: FOGImageReplicator [ OK ]
      boyan@fog4:/etc/php5/cli$
      [/CODE]

    Now all is good as expected:

    [CODE][02-07-15 8:51:18 am] * Starting FOG Multicast Manager Service
    [02-07-15 8:51:23 am] * Checking for new tasks every 10 seconds.
    [02-07-15 8:51:23 am] * Starting service loop.
    [02-07-15 8:51:23 am] * No tasks found!
    [02-07-15 8:51:33 am] * No tasks found!
    [02-07-15 8:51:43 am] * No tasks found![/CODE]


  • Developer

    After the update did you restart the apache2 service?



  • Yes Ubuntu and yes both placed were updated…any other ideas?


  • Senior Developer

    I’m going to guess you’re running ubuntu?

    There’s two places you’ll need to change in that case.

    First as you’re all well aware is /etc/php5/apache2/php.ini

    Second is /etc/php5/cli/php.ini

    Don’t ask me why, that’s how they decided to do it.



  • I discovered that changing the php.ini DOES correct the time zone issue for both the bandwidth graph and for imaging log. However the FOG log still goes by UTC? How does one change that? Here’s an example of the log which I am talking about:

    [CODE][02-06-15 4:53:32 pm] * Starting Image Replication.
    [02-06-15 4:53:32 pm] * We are group ID: #1
    [02-06-15 4:53:32 pm] * We have node ID: #1
    [02-06-15 4:53:32 pm] * I am the only member, no need to copy anything!.
    [02-06-15 5:03:32 pm] * Starting Image Replication.
    [02-06-15 5:03:32 pm] * We are group ID: #1
    [02-06-15 5:03:32 pm] * We have node ID: #1
    [/CODE]



  • Ahhhh, so satisfying. Thank you very much!

    For future reference, the php.ini file should be in /etc/php5/apache2/php.ini (For Debian/Possibly Ubuntu)


  • Developer

    You need to change the timezone in php.

    Instructions:
    search for “[SIZE=14px][COLOR=#000000][FONT=Consolas]date[/FONT][/COLOR][/SIZE][SIZE=14px][COLOR=#000000][FONT=Consolas].[/FONT][/COLOR][/SIZE][SIZE=14px][COLOR=#000000][FONT=Consolas]timezone” in your php.ini[/FONT][/COLOR][/SIZE]

    Time zone options:
    [url]http://php.net/manual/en/timezones.php[/url]

    Be sure to restart apache 2 after the change.


Log in to reply
 

345
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.