Pandora FMS Community

PandoraFMS timezone error

Albert · 6 feb 2023, 4:16 · 19 mensajes · 132 visitas

  1. Inicio del debate

    The date of the pandora server does not seem to change when we modify the timezone and the server time.

    We tried to change the timezone to HongKong but the time displayed is the same.

    We also change the timesource to database, and in database the value is UTC+8

    The server date was also changed to UTC+8 but more problem seem to arise and the pandora does not change.

    Any idea why this happens?

    error.jpg13 KB · JPG
    error.jpg
    timesource.jpg16 KB · JPG
    timesource.jpg
    Capture.png43 KB · PNG
    Capture.png
  2. Hello,

    Did you changed the timezone inside the PandoraFMS Server shell?

    Try Execute this command and establish the timezone you need:

    timedatectl set-timezone Continent/City
    

    From what we can see in the screenshots the Continent and City should be like this:

    timedatectl set-timezone Asia/Hong_Kong
    

    Once this command is executed in the shell it should be matching the one set in Console and this problem should be fixed.

    Kind regards,

    Sergio B.

  3. On the system level the time is correct at UTC+8

    But still the time in the pandoraFMS is wrong and does not follow the server time

    The pandora is run by docker container, does that affect anything?

    Any idea why it happens? What needs to be done to solve this problem?

  4. On the system level the time is correct at UTC+8

    But still the time in the pandoraFMS is wrong and does not follow the server time

    Any idea why it happens? What needs to be done to solve this problem?

    What can be done if the time does not change by anything?

  5. Tips to fix-

    Check the Internet Connection.

    Restart your Android Smartphone.

    Update your Pandora app.

    Clear Cache Files of Pandora App.

    Use a VPN.

    Reinstall App.

    Regards,

    Rachel Gomez

  6. Hello Albert,

    You need to configure inside the PandoraFMS console the user to the timezone in which you currently are. If you are in Hong Kong then you need to set the timezone both in Console General configuration and the user configuration to Asia / Hong_Kong.

    Once you make sure you have both configurations inside the Console set as the same, you can go and check if that timezone is the same inside the server by executing the date command shown in the last response I made.

    You need to bear in mind that if you changed the timezone of the server at anytime you need to restart both the MySQL and then the server in that order.

    That will leave both Server (Docker) and Console (Web) with the same timezone which has to fix the issues you're having now.

    Kind regards,

    Sergio B.

  7. We tried the command you send on the linux server and changed the date, confirmed the zone date is Asia/Hong_Kong and restarted the Mysql then server.
    However, the time in portal remains the same just like the photo i first sent.

    Does running the pandora and mysql in container affect anything? Any special modification need to be done/stored before restarting the containers?

  8. Hello Albert.

    We currently see in the picture that the timezone is Set to Asia/Hong_Kong so we don't understand what the issue is right now.

    It looks for us as everything is configured properly.

    You just setup the timezone in the server to Asia/Hong_Kong so it is currently matching the Console.

    What is the issue you have at the moment?

    Thanks in advance.

    Kind regards,

    Sergio B.

  9. If you say that it is configured properly, then we have done everything correctly.

    However, you can see in the capture.png the time on the right all says 7 hours ago, no matter how we change the time zone

    This is the problem currently

  10. Hello Albert, are you solved it inside your environment?

    Thanks,

    Giuseppe Paolo Fontana Padilha

  11. I have the same error [@Serber](https://pandorafms.com/community/members/serber/). I'm using docker too. The timezone inside docker for PandoraFMS and MySQL are all ok, but inside Pandora show UTC+2... (inclusive I put the parameter TZ inside dockerfile but cannot solved).

    Would you help us?

    Thanks,

    Giuseppe Paolo Fontana Padilha

  12. Hello,

    Can you please execute this parameter and paste here an screenshot of the result?

    timedatectl
    

    Kind regards,

    Sergio B.

  13. Sure, it's attached here...

    PS: I'm using docker ok?

    Thanks,

    Giuseppe Paolo Fontana Padilha

    PandoraDate.jpg50 KB · JPG
    PandoraDate.jpg
  14. Hello Giuseppe,

    From what we can see in the attached image you have the Pandora Server Timezone set to America / Sao Paulo, do you have the same configuration setup in the Console?

    It is important to have both server and console setup with the exactly same Timezone.

    Kind regards,

    Sergio B.

  15. Hello! Yes! It's the same timezone... America/Sao\_Paulo.

    But the alerts sended show date in another timezone UTC+2.

    Thanks,

    Giuseppe Paolo Fontana Padilha

  16. Hello,

    Did you make sure that you have the timezone configured in Console?

    It is important to check if the user has the same timezone configured, maybe it is set on Console but the Console user has a different timezone assinged.

    Make sure both Console and Console User have the same timezone:

    Kind regards,

    Sergio B.

  17. Hello, it's the same, look at attachments...

    Thanks,

    Giuseppe Paolo Fontana Padilha

    PandoraServerSetupTZ.jpg6.1 KB · JPG
    PandoraServerSetupTZ.jpg
    PandoraUserProfileTZ.png20 KB · PNG
    PandoraUserProfileTZ.png
  18. Hello Giuseppe,

    Can you please try to execute this line in your bash docker terminal?

    rm -rf /etc/localtime ; ln -s /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
    

    It looks like Docker containers have some troubles with timezones as there is no systemd.

    Executing this line should change the docker timezone.

    Can you try and see if after executing this line works properly?

    Kind regards,

    Sergio B.

  19. Sergio, you're correct! The issue is solved after changing the TZ inside docker. I will put this command inside docker-compose.yml.

    Thanks,

    Giuseppe Paolo Fontana Padilha

Entra en tu cuenta para publicar.