Announcement

Collapse
No announcement yet.

Birthday before 1970 always 1970

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Birthday before 1970 always 1970

    I'm on a Unix server and apparently there is an error with any birthday before January 1st, 1970 being displayed as 1 January, 1970.

    Redhat 7.3, PHP 4.2.1 vB 2.2.5 with latest fixes for PHP 4.2.1 added.

    I also get this on my test server which has PHP 4.12 and another which has PHP 4.0.6

    Definately looks like a vB problem because removing $birthday from the getinfo_birthday template and replacing it with $bday[2] etc (what is used in member.php) addresses this.
    using vbportal 3.x for vbulletin 3.x - not just another pretty front page for your site.

  • #2
    This is probably because the epoch for *nix was on January 1, 1970. I'm not sure if this is fixable or what.

    Edit: Hate to use you as an example, Steve, but it works on this profile: http://www.vbulletin.com/forum/membe...nfo&userid=656

    So maybe I'm not sure what you're talking about.
    Last edited by andrewpfeifer; Sun 9th Jun '02, 6:58pm.
    - Andrew Pfeifer

    Comment


    • #3
      yes this is a strange one, cos it works on all the other forums I'm registered on.

      The only thing I've noticed so far is there all USA sites

      I have just installed easyphp on a windaes machine and quicky transferred my php files and DB across and the birthday is correct.

      Oh my gosh, something that Windaes can do that Linux doesn't.

      I'm just comparing the 2 phpinfo() outputs to see if anything is apparent.
      using vbportal 3.x for vbulletin 3.x - not just another pretty front page for your site.

      Comment


      • #4
        Maybe try upgrading your forums to 2.2.6 and see if that fixes it.
        - Andrew Pfeifer

        Comment


        • #5
          I'm building a new Linux box in the morning (5 hrs away argghhhh ) so I'll put 2.2.6 on it.

          Thanks for replying

          PS, I was looking at the 2 versions (2.2.5 and 2.2.6) with Beyond Compare and nothing sticks out, but fingers crossed.

          Its no big deal, the birthdays etc are all correct, just the output, but now have a few members born Jan 1 1970 in their profile,
          using vbportal 3.x for vbulletin 3.x - not just another pretty front page for your site.

          Comment


          • #6
            This doesn't happen on either on my two forums nor on this one. Birthdays earlier than 01/01/1970 have always displayed correctly, even as early as vB 2.0 beta 3 (the first vB I used.) This site is running PHP 4.2.1 and the birthdays display fine. Just look at my profile.

            Have you installed any hacks to your forums?
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment


            • #7
              Actually, it's a limit of how the date() function works on certain systems. Breaks in Windows as well. Times less than Jan 1, 1970 will be negative relative to the epoch, and some OS's don't handle that. (I saw this once before on a *nix box, but I can't remember the specifics of the setup.)

              Comment


              • #8
                I think it is a *nix issue I'm having.

                One thing I noticed but don't know if it is relevant, the following output from phpinfo()

                Linux daffy.perf.redhat.com 2.4.17-0.13smp #1 SMP Fri Feb 1 10:30:48 EST 2002 i686 unknown

                I'm British Summer Time. All my servers have that, though, except the Windows 98 test system, which has nothing for the Time Zone and displays fine.

                I have an older RedHat 7.2 distro with PHP 4.0.6 and the birthdays are correct, so this only happened since I changed to 7.3 and/or php 4.1.2 or higher as one of my test servers has 7.3 and php 4.1.2 and its displaying the birthday wrong.



                further analysis required
                using vbportal 3.x for vbulletin 3.x - not just another pretty front page for your site.

                Comment


                • #9
                  steves 50?
                  Running vB since 4-14-2002

                  Comment


                  • #10
                    AFAIK, the only way to fix it is to find this line in member.php:

                    Code:
                    $birthday = @date($calformat1,mktime(0,0,0,$bday[1],$bday[2],$bday[0]));
                    And replace it with:

                    Code:
                    $birthday = @date($calformat2,mktime(0,0,0,$bday[1],$bday[2],1993)) . ", $bday[0]";

                    Comment


                    • #11
                      Originally posted by IDN
                      steves 50?
                      Still just 49, but thank's for noticing!

                      thebigboss, I'm running Redhat 7.1 with PHP 4.1.2 on my server and have no date problems.
                      Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                      Change CKEditor Colors to Match Style (for 4.1.4 and above)

                      Steve Machol Photography


                      Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                      Comment


                      • #12
                        Thanks all for posting

                        Ed, I made the changes you posted to my live site, thankyou.

                        Steve, My dads fifty+ (just kidding), I'm also running a DeadRat 7.1 server with php 4.0.6 and the birthday is fine (same database - a backup of the live site), so I'm putting it down to the way I have RedHat configured.

                        I haven't made Steve's change to my other RH 7.3, PHP 4.2.1 site in a hope to track this down. I think I'm in for a long night.

                        Thanks again.

                        Incidently, in phpinfo() where does the timezone come from ? that I mentioned in an above post, if anyone knows, I can eliminate that as the problem too, as mine is EST not GMT or BST as it should be.
                        Last edited by thebigboss; Mon 13th Jan '03, 5:53pm.
                        using vbportal 3.x for vbulletin 3.x - not just another pretty front page for your site.

                        Comment


                        • #13
                          Originally posted by thebigboss
                          Thanks all for posting

                          Ed, I made the changes you posted to my live site, thankyou.

                          Steve, My dads fifty (just kidding),
                          That's ok. All five of my 'kids' are older than most the people I see posting on these forums.

                          Incidently, in phpinfo() where does the timezone come from ?
                          Do you mean at the very top where it gives the server info? If so, this is the timezone of the server.
                          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                          Change CKEditor Colors to Match Style (for 4.1.4 and above)

                          Steve Machol Photography


                          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                          Comment


                          • #14
                            Yes I did mean right at the top where it gives the server info.

                            Strange though because I'm certain I set the timezone as GMT, will double check now.

                            Thanks again, your helps appreciated.
                            using vbportal 3.x for vbulletin 3.x - not just another pretty front page for your site.

                            Comment


                            • #15
                              Whoo Hoo!

                              Thank you Ed Sullivan!!

                              I applied the above changes and POOF everyone has their b-day displayed as it should!!

                              My only concern is that this appears to be a known bug(as I've seen other posts re. this issue), so is this something that can be addressed in v3.0?

                              Thanks again.
                              All who wander are not lost.
                              - JRR Tolkien -

                              Comment

                              Related Topics

                              Collapse

                              Working...
                              X