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 7514329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:27:47+00:00 2026-05-30T00:27:47+00:00

If 21600 is 6 hours in seconds why does my counter say 7 hours

  • 0

If 21600 is 6 hours in seconds why does my counter say 7 hours and 15 minutes? Am I missing something here?

Here is a demo:

  • http://jsfiddle.net/kLk4f/

JS

var time_in_seconds = 26100; // 6 hours in seconds

setInterval(function() {
    $('#countdown').html(seconds2time(time_in_seconds));
    time_in_seconds--;
}, 1000);

function seconds2time(seconds) {
    var hours   = Math.floor(seconds / 3600);
    var minutes = Math.floor((seconds - (hours * 3600)) / 60);
    var seconds = seconds - (hours * 3600) - (minutes * 60);
    var time = "";

    if (hours != 0) {
      time = hours+":";
    }
    if (minutes != 0 || time !== "") {
      minutes = (minutes < 10 && time !== "") ? "0"+minutes : String(minutes);
      time += minutes+":";
    }
    if (time === "") {
      time = seconds+"s";
    }
    else {
      time += (seconds < 10) ? "0"+seconds : String(seconds);
    }
    return time;
}

​

HTML

<span id="countdown"></span>​
  • 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-05-30T00:27:49+00:00Added an answer on May 30, 2026 at 12:27 am

    26100 is not the same as 21600

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a matrix lets say: a = 401.4800 344.0900 305.0300 462.2100 310.0600 397.3400
I am using the following JSON: http://www.kb.dk/tekst/mobil/aabningstider_en.json When I try to parse it by
So I've been following this tutorial http://drupal.org/node/751826 . I took the following code: <?php
I am attempting to write out an Excel file from an ASP.NET web server
I am passing some values to database(SQL Server) here one of the field contains
I have data generated in a simulation. The generated data file looks something like
how to add 6 hours to this string? $parent = 2011-08-04 15:00:01; I think
So I need cron to execute a script every 3 hours, on the hour
im not so good with javascript but i have searched for 5 hours now
From this online calculator: http://homer.freeshell.org/dd.cgi using its data I've successfully written a working version,

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.