WordPress.org

Ready to get started?Download WordPress

Forums

Countdown Timer
[resolved] Incorrectly counts from Dec 31st, 1969 (2 posts)

  1. fwu@square2.com
    Member
    Posted 2 years ago #

    Hi, I installed Countdown Timer on a school website I maintain. They wanted a countdown to a school event happening on October 9, 2011 to appear on the event page. I used:

    [fergcorp_cdt_single date="October 9, 2011"]

    The issue is that instead of counting down to the desired date, the timer appears to be counting away from Dec 31st, 1969 5:00 pm for some reason. No matter how I try writing the desired date (10/09/11; 2011-10-09; or Oct 9, 2011), the timer is still off. Would this have something to do with the host provider? I see the date correctly in WordPress > Settings > General.

    Any suggestions would be greatly appreciated!

    Thanks,
    Frank

    http://wordpress.org/extend/plugins/countdown-timer/

  2. fergbrain
    Member
    Plugin Author

    Posted 2 years ago #

    Usually when an event comes up as Dec 31st, 1969 or something around that time, it means that the information was not parsed correctly. Countdown Timer uses Unix time to keep track of events to count down to and if a variable (such as "October 9, 2011") can't be parsed correctly it ends up returning "0" (instead of something closer to 1320796800). "0" is the Unix Epoch and corresponds to January 1st, 1970 UCT (https://secure.wikimedia.org/wikipedia/en/wiki/Unix_time). Adjusting for timezones gets you back to Dec 31st, 1969.

    Have you tried "9 October 2011"?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic