We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Countdown Plugin Zeros Out

Development and Programming

Perak's avatar
Perak
45 posts
20 years ago
Perak's avatar Perak

Little problem with the Countdown plugin: it always says there are 0 days and 0 hours left until the event. I dropped the plugin into the plugins folder, added the code properly. I haven’t found a mention of this happening to anyone else.

If it means anything, the code is on an embedded template.

       
Perak's avatar
Perak
45 posts
20 years ago
Perak's avatar Perak

Curiouser and curiouser, as they say. I changed the year to 2005 and some arbitrary date, and it seemed to work. So I set date at 25, month at 12 and year at 2004 to see if perhaps we were a month off (for whatever reason). The result was 17 days and 9 hours to Thanksgiving. Not right at all, days or hours.

Posting times from my server are correct.

       
Janine's avatar
Janine
1 posts
20 years ago
Janine's avatar Janine

yes I am having the same problems with it

       
Perak's avatar
Perak
45 posts
20 years ago
Perak's avatar Perak

Glad to hear it wasn’t just me. 😊

       
rish's avatar
rish
4 posts
19 years ago
rish's avatar rish

Reports zero for me as well :(

{exp:countdown day="20" month="2" year="2006" hours="4" event="Start Gun"}

There are 0 days and 0 hours until Start Gun

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
19 years ago
Sue Crocker's avatar Sue Crocker

Rish, if the countdown date has expired (yours has) you’ll see 0 days and 0 hours display.

Mine works just fine on a date that is in the future.

Days Until St. Patrick’s Day There are 18 days and 18 hours until St. Patrick’s Day

       
rish's avatar
rish
4 posts
19 years ago
rish's avatar rish

Very good! One month ahead of myself 😊

All good, thanks.

       
smartpill's avatar
smartpill
456 posts
18 years ago
smartpill's avatar smartpill

I’m using the Countdown plugin (1.2) with EE 1.5.2 and the hours parameter doesn’t seem to work. I’m trying to set it to 5pm, which I have as

hours="17"

but it is being ignored. Otherwise, the day date and year are working fine. Anybody have any suggestions?

       
jochta's avatar
jochta
7 posts
16 years ago
jochta's avatar jochta
I’m using the Countdown plugin (1.2) with EE 1.5.2 and the hours parameter doesn’t seem to work. I’m trying to set it to 5pm, which I have as
hours="17"
but it is being ignored. Otherwise, the day date and year are working fine. Anybody have any suggestions?

Old topic but just installed the plugin and spotted the same problem in v1.2. Two things, the parameter should be hour=”17” and not hours and there is a bug in the code.

Line 31 in pi.countdown.php has an error, it should read…

//make unix timestamp for given date
  $countdowndate = mktime($hour, 0, 0, $month, $day, $year);

It was using the $hour parameter in the seconds position of mktime.

John

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.