1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

A big software update is on its way!

Discussion in 'Site Issues & Feedback' started by ElectroMaster, Sep 10, 2013.

  1. killivolt

    killivolt Well-Known Member

    Joined:
    Mar 12, 2008
    Messages:
    3,213
    Likes:
    121
    Location:
    U.S.
    I've always thought those were pretty cool, maybe he didn't intend on it continuing. Maybe it's to much on the religious side of things?
     
  2. ElectroMaster

    ElectroMaster Administrator

    Joined:
    Jul 5, 2002
    Messages:
    2,059
    Likes:
    127
    Location:
    Broadbeach, AU
    Christmas was cancelled :D

    It was a coding error that triggered the xmas decorations for only one day! All sorted now :D

    Spot the mistake:

    PHP:

           $time = XenForo_Application::$time;
         
            // CHRISTMAS (1ST DEC - 7TH JAN)
            $christmasStart = mktime(0, 0, 0, 12, 1, date('Y'));
            $christmasEnd = mktime(23, 59, 59, 12, 1, date('Y'));
            $christmas1Start = mktime(0, 0, 0, 1, 1, date('Y'));
            $christmas1End = mktime(23, 59, 59, 1, 7, date('Y'));
         
            if ($christmasStart <= $time && $christmasEnd >= $time) {
                return "showChristmasHeader";
            } else if ($christmas1Start <= $time && $christmas1End >= $time) {
                return "showChristmasHeader";
            }
           
     
    Last edited: Dec 3, 2013
  3. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,306
    Likes:
    914
    Location:
    Rochdale UK
    Wouldn't that have given us Christmas ALL year....
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. ElectroMaster

    ElectroMaster Administrator

    Joined:
    Jul 5, 2002
    Messages:
    2,059
    Likes:
    127
    Location:
    Broadbeach, AU

    Nope. It gave us 1 day in december.. See it now?
     
  6. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,306
    Likes:
    914
    Location:
    Rochdale UK
    Oh yeah... 1 - 12 to the 1- 12... 24 hours!!!
     
    • Like Like x 1
  7. ElectroMaster

    ElectroMaster Administrator

    Joined:
    Jul 5, 2002
    Messages:
    2,059
    Likes:
    127
    Location:
    Broadbeach, AU
    Yeah.. you got it!
     
  8. jpanhalt

    jpanhalt Well-Known Member Most Helpful Member

    Joined:
    Jun 21, 2006
    Messages:
    6,061
    Likes:
    520
    Location:
    Cleveland, OH, USA
    Thanks. With all of the grandkids I have, Christmas is a big deal now.

    John
     
    • Like Like x 2

Share This Page