Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [Solved] Time in Shell is different of webConfigurator

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 1 Posters 788 Views
    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.
    • E
      evilside
      last edited by

      Hi

      I have PFSense 2.2.6, in Chile have updated the DTS of our time zone. In webConfigurator->System->General Setup, the time zone is America/Santiago.

      This zone it's not updated en PFSense, thus, the time is one hour ahead since may 15th. For fix this problem, I entered through of SSH and I have installed the "zoneinfo" FreeBSD package:

      pkg install zoneinfo
      ln -sf /usr/share/zoneinfo/America/Santiago /etc/localtime

      The time in the console is correct after these command, but after restart, are lost the changes.

      I read in another forum that the time zones are obtained from the file: /usr/share/zoneinfo.tgz. Thus, I downloaded the file: http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/zoneinfo-2016.d.txz

      I have uncompressed, reordered the directories and compressed in TGZ format for replace the file /usr/share/zoneinfo.tgz.

      Now, after reboot the time in console is correct, but in webConfigurator still is advance one hour.

      wc.png
      wc.png_thumb
      wc2.png
      wc2.png_thumb

      1 Reply Last reply Reply Quote 0
      • E
        evilside
        last edited by

        Maybe not have solution for now. PHP use the time zones from a own database. In this blog is desribed how to update the time zones, but is neccesary the PECL command and is not easy install in PFSense.

        http://www.electrictoolbox.com/correct-php-timezone/

        At least, the LOGs are with the correct time after the update the file zoneinfo.tgz with the new. This are instructions, to run in other computer with Linux (192.168.0.1 is the PFSense address):

        mkdir zoneinfo
        cd zoneinfo
        wget http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/zoneinfo-2016.d.txz
        xz -d zoneinfo-2016.d.txz
        tar xf zoneinfo-2016.d.tar
        cd usr/share/zoneinfo
        tar czf ../../../zoneinfo.tgz *
        cd ../../../
        scp zoneinfo.tgz root@192.168.0.1:/usr/share/
        

        Reboot after…

        1 Reply Last reply Reply Quote 0
        • E
          evilside
          last edited by

          In PFSense 2.3.1 version, PHP have the updated time zones and the webConfigurator time is correct, but the console not, thus, the LOGs show the incorrect time…  :o

          I fix with this:

          mkdir zoneinfo
          cd zoneinfo
          wget http://pkg.freebsd.org/freebsd:11:x86:64/latest/All/zoneinfo-2016.d.txz
          xz -d zoneinfo-2016.d.txz
          tar xf zoneinfo-2016.d.tar
          cd usr/share/zoneinfo
          tar czf ../../../zoneinfo.tgz *
          cd ../../../
          scp zoneinfo.tgz root@192.168.0.1:/usr/share
          ssh root@192.168.0.1
          8
          cd /usr/share/zoneinfo
          tar czf ../zoneinfo.bkp.tgz *
          mv ../zoneinfo.tgz .
          tar xzf zoneinfo.tgz
          

          After reboot…

          The file /usr/share/zoneinfo.bkp.tgz is a backup of original files.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.