# Flash countdown is hour too fast?

**URL:** <https://forum.kirupa.com/t/flash-countdown-is-hour-too-fast/318310>\
**Category:** Uncategorized\
**Created:** [January 16, 2011, 5:50pm UTC](https://forum.kirupa.com/t/flash-countdown-is-hour-too-fast/318310 "2011-01-16T17:50:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![westy2006](https://avatars.discourse-cdn.com/v4/letter/w/71e660/32.png) [@westy2006](https://forum.kirupa.com/u/westy2006)\
**Post date:** [January 16, 2011, 5:50pm UTC](https://forum.kirupa.com/t/flash-countdown-is-hour-too-fast/318310/1 "2011-01-16T17:50:39Z")

</div>

Hi, I created a flash countdown for an event and it all seems to be working except it seems to be an hour too fast! You can view the countdown on the right side of this page [http://www.womenssoccerunited.com](http://www.womenssoccerunited.com)

The actionscript I used is below:

```auto
this.onEnterFrame = function () {

	var today:Date = new Date ();
	var currentYear = today.getFullYear();
	var currentTime = today.getTime();

	var targetDate:Date = new Date(currentYear,5,26);
	var targetTime = targetDate.getTime();

	var timeLeft = targetTime - currentTime;
	
	var sec = Math.floor(timeLeft/1000);
	var min = Math.floor(sec/60);
	var hrs = Math.floor(min/60);
	var days = Math.floor(hrs/24);
	sec = string(sec % 60);
	if (sec.length < 2) {
            sec = "0" + sec;
        }
        min = string(min % 60);
        if (min.length < 2) {
            min = "0" + min;
        }
        hrs = string(hrs % 24);
	if (hrs.length < 2) {
            hrs = "0" + hrs;
        }
	days = string(days);

	var counter:String = days + " " + hrs + " " + min + " " + sec;
	time_txt.text = counter;

}

```

Please can you have a look and see if it is an hour too fast for you and how I can fix it 🙂 Thank you
