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

PFSense PHP time is incorrect in America/Sao_Paulo time zone

Scheduled Pinned Locked Moved General pfSense Questions
23 Posts 5 Posters 2.2k 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.
  • C
    cesarmsj
    last edited by cesarmsj Nov 20, 2020, 12:54 AM Nov 20, 2020, 12:48 AM

    The president of Brazil canceled daylight saving time in the country this year and it appears that many systems have not been updated. The latest version of PFSense, 2.4.5-RELEASE-p1, has the correct system time, but not PHP, as PHP searches for a system-independent timezone database. Netgate
    could you update the PHP timezone, please, or is there already a patch patch?

    1 Reply Last reply Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by Nov 22, 2020, 5:20 PM

      Hmm, looks like we have a version that should contain that in 2.4.5:
      https://github.com/pfsense/FreeBSD-ports/tree/RELENG_2_4_5/misc/pecl-timezonedb

      What are you actually seeing?

      Steve

      C 1 Reply Last reply Nov 22, 2020, 5:53 PM Reply Quote 0
      • M
        mcury
        last edited by mcury Nov 22, 2020, 5:34 PM Nov 22, 2020, 5:23 PM

        I noticed that too.
        Changed from America/Sao_Paulo to GMT +3 and it fixed for me.

        It was showing the wrong time in logs, now I don't remember if it was one hour ahead or one hour earlier.
        Also, in the dashboard, same problem.

        6762cce9-136d-4d25-8723-00592a4a595b-image.png

        dead on arrival, nowhere to be found.

        C 1 Reply Last reply Nov 22, 2020, 5:45 PM Reply Quote 0
        • C
          cesarmsj @mcury
          last edited by Nov 22, 2020, 5:45 PM

          @mcury Very very strange, because the correct one would not be GMT -3?

          1 Reply Last reply Reply Quote 0
          • M
            mcury
            last edited by Nov 22, 2020, 5:49 PM

            Yes, I guess the tzdata is not up to date.
            Remember that the new government changed how the summertime in Brazil works? It happened in 2019

            https://pt.wikipedia.org/wiki/Hor%C3%A1rio_de_ver%C3%A3o_no_Brasil#:~:text=No%20dia%2025%20de%20abril,vai%20aumentar%20produtividade%20do%20trabalhador.

            But this is only a guess, not sure if this is the problem indeed.

            dead on arrival, nowhere to be found.

            C 1 Reply Last reply Nov 22, 2020, 6:37 PM Reply Quote 0
            • C
              cesarmsj @stephenw10
              last edited by Nov 22, 2020, 5:53 PM

              @stephenw10 Is this an official repository? Why doesn't this updated package come with the latest version of pfsense? What would be the most correct process of updating pecl-timezonedb?

              1 Reply Last reply Reply Quote 0
              • C
                cesarmsj @mcury
                last edited by Nov 22, 2020, 6:37 PM

                @mcury This is the problem, but I would like to know how to update tzdata correctly in pfsense.

                1 Reply Last reply Reply Quote 0
                • S
                  stephenw10 Netgate Administrator
                  last edited by Nov 22, 2020, 6:49 PM

                  Yes, that is the pfSense repo and that is the 2.4.5 release branch. That is the version that's in 2.4.5p1.

                  But I assume you are setting Sao Paulo directly and seeing GMT+2 instead?

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • C
                    cesarmsj
                    last edited by Nov 22, 2020, 7:17 PM

                    But the correct thing would be America/Sao_Paulo to be GMT -3

                    M 1 Reply Last reply Nov 22, 2020, 7:19 PM Reply Quote 0
                    • M
                      mcury @cesarmsj
                      last edited by Nov 22, 2020, 7:19 PM

                      @cesarmsj Can you check if you are seeing one hour ahead or one hour earlier?
                      Unfortunately if I change now to answer Stephenw10, it will mess up my logs.
                      I don't know how to update tzdata manually..

                      dead on arrival, nowhere to be found.

                      C 1 Reply Last reply Nov 22, 2020, 7:22 PM Reply Quote 0
                      • C
                        cesarmsj @mcury
                        last edited by Nov 22, 2020, 7:22 PM

                        @mcury America/Sao_Paulo is one more hour.

                        M 1 Reply Last reply Nov 22, 2020, 7:27 PM Reply Quote 0
                        • M
                          mcury @cesarmsj
                          last edited by Nov 22, 2020, 7:27 PM

                          @cesarmsj One hour ahead then.
                          Answering Stephenw10, yes it is showing GMT +2, which means 2 hours behind than GMT. America/Sao_Paulo should be GMT +3, which is 3 hours behind GMT.

                          dead on arrival, nowhere to be found.

                          C 1 Reply Last reply Nov 22, 2020, 7:45 PM Reply Quote 0
                          • C
                            cesarmsj @mcury
                            last edited by Nov 22, 2020, 7:45 PM

                            @mcury Why do they say it's GMT +3, I ask again, wouldn't it be GMT -3? See: https://greenwichmeantime.com/time-zone/south-america/brazil/time-brazil/

                            1 Reply Last reply Reply Quote 0
                            • M
                              mcury
                              last edited by mcury Nov 22, 2020, 7:52 PM Nov 22, 2020, 7:47 PM

                              I understand, but they calculate like this:
                              GMT + X = LT

                              So, X is added to GMT to reach the desired LT.

                              3a6f1518-6378-4050-a702-afba6ca1cccc-image.png

                              Can you see the message after Etc/GMT +3 --> (3 hours behind GMT) ?

                              dead on arrival, nowhere to be found.

                              C 1 Reply Last reply Nov 22, 2020, 7:52 PM Reply Quote 0
                              • C
                                cesarmsj @mcury
                                last edited by Nov 22, 2020, 7:52 PM

                                @mcury
                                Our PFSense is in version: 2.4.5-RELEASE (amd64) built on Tue Mar 24 15:25:50 EDT 2020 FreeBSD 11.3-STABLE)

                                But anyway, will this be fixed in the next version to be released?

                                1 Reply Last reply Reply Quote 0
                                • M
                                  mcury
                                  last edited by mcury Nov 22, 2020, 7:56 PM Nov 22, 2020, 7:55 PM

                                  I'm not sure, as far as I'm aware, they didn't know about the summertime changes in Brazil.
                                  2.5.0 is coming, maybe it will be fixed by then.

                                  Change to GMT +3 for now, and it will fix it until a patch or a new version is released.

                                  Same behavior on 2.4.5p1

                                  2.4.5-RELEASE-p1 (arm)
                                  built on Tue Jun 02 17:45:24 EDT 2020
                                  FreeBSD 11.3-STABLE

                                  dead on arrival, nowhere to be found.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    stephenw10 Netgate Administrator
                                    last edited by stephenw10 Nov 22, 2020, 8:50 PM Nov 22, 2020, 8:49 PM

                                    It looks correct in 2.5 though:

                                    Current date/time 	
                                    Sun Nov 22 17:47:20 -03 2020
                                    

                                    3hrs difference when I set Sao Paulo.

                                    It's unlikely this will be corrected before 2.5 is released. I would just set GMT+3 until then.

                                    Steve

                                    C 1 Reply Last reply Jan 2, 2021, 10:45 PM Reply Quote 1
                                    • C
                                      cesarmsj @stephenw10
                                      last edited by Jan 2, 2021, 10:45 PM

                                      @stephenw10
                                      Is it possible that PFSense 2.5 stable version will take time to be released? The fix may be included in private FreeBSD 12 updates.

                                      Here are the links I've been reading, but we can't put this dev version into production until LTS is released:

                                      https://www.netgate.com/blog/pfsense-2-5-0-development-snapshots-now-available.html

                                      https://docs.netgate.com/pfsense/en/latest/releases/2-5-0.html

                                      johnpozJ 1 Reply Last reply Jan 3, 2021, 1:27 PM Reply Quote 0
                                      • S
                                        stephenw10 Netgate Administrator
                                        last edited by Jan 3, 2021, 12:18 PM

                                        I'm not sure what you're asking there.

                                        The next version of pfSense will be released when it's ready. You can follow the open issues here: https://redmine.pfsense.org/projects/pfsense/issues?query_id=106

                                        Steve

                                        1 Reply Last reply Reply Quote 0
                                        • johnpozJ
                                          johnpoz LAYER 8 Global Moderator @cesarmsj
                                          last edited by johnpoz Jan 3, 2021, 1:29 PM Jan 3, 2021, 1:27 PM

                                          @cesarmsj said in PFSense PHP time is incorrect in America/Sao_Paulo time zone:

                                          into production until LTS is released:

                                          Never seen a LTS version of pfsense ;) If that was what your asking.. Here is the lifecycle for hardware. Never seen anything like that for pfsense version. Normally the old version drops off support once its be replaced with new new version, they normally support the previous version. But not the one before that.

                                          https://www.netgate.com/support/product-lifecycle.html

                                          pfsense versions and if supported
                                          https://docs.netgate.com/pfsense/en/latest/releases/versions.html

                                          An intelligent man is sometimes forced to be drunk to spend time with his fools
                                          If you get confused: Listen to the Music Play
                                          Please don't Chat/PM me for help, unless mod related
                                          SG-4860 24.11 | Lab VMs 2.8, 24.11

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            [[user:consent.lead]]
                                            [[user:consent.not_received]]