Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7865543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:07:18+00:00 2026-06-03T00:07:18+00:00

Note * I want some one to fix it and tell me how they

  • 0

Note * I want some one to fix it and tell me how they did it not tips on how to do it or coments about php nd java mixed in it *

I have a countdown script that is working, but when it hits the target date the timer keeps on going to a negative time. I want it to stop on that target date and just display a finishing message. It’s live on my site. I just need help editing the countdown script.

I want to keep the same layout. I need some help adding the finishing message and stopping it from going into the negative date, or just make it not display the 0days, 0 hours, 0mins, 0sec until the site’s officially released. When that finally happens, I want it to display a message.

countdown script

<?php date_default_timezone_set('EST'); ?>
<?php
// Define your target date here
    $targetYear  = 2011;
    $targetMonth = 9;
    $targetDay   = 1;
    $targetHour  = 20;
    $targetMinute= 00;
    $targetSecond= 00;
// End target date definition

// Define date format
$dateFormat = "Y-m-d H:i:s";

$targetDate = mktime($targetHour,$targetMinute,$targetSecond,$targetMonth,$targetDay,$targetYear);
$actualDate = time();

$secondsDiff = $targetDate - $actualDate;

$remainingDay     = floor($secondsDiff/60/60/24);
$remainingHour    = floor(($secondsDiff-($remainingDay*60*60*24))/60/60);
$remainingMinutes = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))/60);
$remainingSeconds = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))-($remainingMinutes*60));

$targetDateDisplay = date($dateFormat,$targetDate);
$actualDateDisplay = date($dateFormat,$actualDate);

?>
<script type="text/javascript">
  var days = <?php echo $remainingDay; ?>  
  var hours = <?php echo $remainingHour; ?>  
  var minutes = <?php echo $remainingMinutes; ?>  
  var seconds = <?php echo $remainingSeconds; ?>  
</script>
<body onLoad="setCountDown();">
<center><?php echo "$remainingDay days, $remainingHour hours, $remainingMinutes minutes and $remainingSeconds seconds";?> untill official release</center>

how its added on the site

<script type="text/javascript">
$(function() {
    /* Union War */
    $("#Countdown2").load("http://imperialism.zxq.net/includes/process/uwcountdown.php");

    setInterval(function(){
        $("#Countdown2").load("http://imperialism.zxq.net/includes/process/uwcountdown.php");
    }, 1000);
});
</script>

<div id="uwCD" class="uwCD">
    <div id="Countdown2"></div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T00:07:20+00:00Added an answer on June 3, 2026 at 12:07 am
    if($targetDate != $actualDate && $targetDate > $actualDate) { 
    echo "$remainingDay days, $remainingHour hours, $remainingMinutes minutes and $remainingSeconds seconds"; 
    } else { 
    echo "0 days, 0 hours, 0 minutes and 0 seconds"; 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just want to get a quick htaccess redirection. ie: domain.com/subfolderGreen --> domain.com/index.php?folder=subfolderGreen (note
Before I ask this, do note: I want this for debugging purposes. I know
note: i only want to move 1 shape at a time Circle.prototype.create = function(){
I want to note that this is COMPLETELY a made up question. I am
Everything I'm finding via google is garbage... Note that I want the answer in
I want to show terms and condition note on my website. I dont want
I want to be able to add a little note, at the beginning of
I want to be able to convert between the Gregorian and Julian calendars (note:
I want to perform simple validation against multiple fields. Please note these fields are
I want to create an XSD which can generate the following XML. <note> <email:to>abc@def.com</email:to>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.