SOLVED Date off in dashboard #253 - Github

  • Has anyone had this issue before? I have the system time showing me the correct date and time. So the graph on the dashboard is 1 day off.


    [mrparle@10-72-101-22 fog]$ date
    Tue Jun 26 16:41:26 PDT 2018

  • Moderator

    @mparlette said in Date off in dashboard #253 - Github:

    CentOS 7 w/ FOG 1.5.4
    /etc/php.ini date.timezone entry was commented out.
    corrected with:
    date.timezone =“America/Vancouver”

    Technically that may not help you. In a normal world it would. But in FOG’s case its using php-fpm which has its own opinion of things and if you have php 7.x installed then the /etc/php.ini file is typically not referenced since php 7 has this file in a different path.

    But having the OS and fog menus in agreement should get you to where you want to be. So good job!!

  • @mparlette You don’t need to. I’ll post information about this forum thread to the github so people know we were aware, just it wasn’t “technically” a bug, rather a misconfiguration.

  • @george1421

    Thanks George.

    CentOS 7 w/ FOG 1.5.4
    /etc/php.ini date.timezone entry was commented out.

    corrected with:
    date.timezone =“America/Vancouver”


    rebooted, and seems to be showing correctly now:

    Appreciate the help, I have a mega lab of hardware that I am gonna be setting up with FOG for McAfee. You may see me around the forums from time to time.

    Do you want me to retract the GitHub bug report?

    Mike Parlette

  • Moderator

    @mparlette Ok you have a few things to work on.

    First I would set your system timezone correctly (not UTC). Understand this is the linux timezone setting of your linux distro. Once that is set, then in the fog gui under Fog Settings->Fog Configuration expand all menus and search for time make sure that is right. Once all are set correctly reboot the fog server. From then on your times should be correct.

  • @george1421
    mrparle@10-72-101-22 ~]$ php -i |grep “php.ini”
    Configuration File (php.ini) Path => /etc
    Loaded Configuration File => /etc/php.ini
    PHP Warning: Unknown: 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 the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in Unknown on line 0
    [mrparle@10-72-101-22 ~]$

    I dont see a timezone setting in the e /opt/fog/.fogsettings file

    gui shows:
    TZ INFO > UTC [UTC + 0:00]

    So should I set the php.ini and match the setting in the gui / restart services / reboot and see if that makes it work?

    Thanks Mike

  • Moderator

    I wonder if its related to a php time being off. Since you are PDT, I might have expected it to be a day ahead not behind if php is using UTC time.

    Is the system timezone set correctly?
    Do you have the timezone set correctly inside the fog gui (FOG Settings)?