JQUERY add updating time in timestamp format

79 Views Asked by At

Im using for my site a Modern Circular jQuery Countdown Timer Plugin and It doesnt have a updating timestamp. When I refreshing a page, time restarts from beginning, but I need to set time with current, and Its refresh it by itself, and countdown from current time to end time.

I need just simple countdown. There's is end date, for example 12 september 9:00 AM and it counts down from current date and time. Now I need to set for example 4th september and counts down to 12 september 9:00 AM

This is the Jquery

$('.countdown').final_countdown({
    'start': 1503904446,
    'end': 1506492000,
    'now': 1503904446,
    }, function() {
        alert('end');
});
1

There are 1 best solutions below

3
Ankit Agarwal On

Try this:

$('.countdown').final_countdown({
    'start': 1503904446,
    'end': new Date().getTime(),
    'now': 1503904446,
    }, function() {
        alert('end');
});