# Date Countdown

**URL:** <https://forum.kirupa.com/t/date-countdown/265385>\
**Category:** Uncategorized\
**Created:** [July 8, 2008, 12:06pm UTC](https://forum.kirupa.com/t/date-countdown/265385 "2008-07-08T12:06:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jake0037](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jake0037](https://forum.kirupa.com/u/jake0037)\
**Post date:** [July 8, 2008, 12:06pm UTC](https://forum.kirupa.com/t/date-countdown/265385/1 "2008-07-08T12:06:55Z")

</div>

Hi I am trying to make the date countdown clock as shown in this tutorial [http://www.kirupa.com/developer/mx/countdown.htm](http://www.kirupa.com/developer/mx/countdown.htm)

But i have found that it is miscalculating the countdown by 1 hour if you have more than 100 days to go.

Any idea why?

Thanks

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [July 8, 2008, 3:59pm UTC](https://forum.kirupa.com/t/date-countdown/265385/2 "2008-07-08T15:59:34Z")

</div>

Daylight saving!

You’ll need to adjust the script to take account of daylight saving according to your own timezone. A search on the forums should provide plenty of information:

> **[Display Date and Time in a certain country](https://www.kirupa.com/forum/showthread.php?t=168308)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

  

> **[getTimezoneOffset ???/](https://www.kirupa.com/forum/showthread.php?t=238702)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

  

> **[help me make flash clock ( not local pc time)](https://www.kirupa.com/forum/showthread.php?t=202172)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

---

<div class="post-metadata">

**Author:** ![jake0037](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jake0037](https://forum.kirupa.com/u/jake0037)\
**Post date:** [July 9, 2008, 12:19am UTC](https://forum.kirupa.com/t/date-countdown/265385/3 "2008-07-09T00:19:16Z")

</div>

That shouldnt make a difference as the file gets the local time off your machine, it has something to do when the count is more than 100 days to go.

Also i’m in Winter Time right now

Thanks though

[quote=glosrfc;2355258]Daylight saving!

You’ll need to adjust the script to take account of daylight saving according to your own timezone. A search on the forums should provide plenty of information:

> **[Display Date and Time in a certain country](https://www.kirupa.com/forum/showthread.php?t=168308)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

  

> **[getTimezoneOffset ???/](https://www.kirupa.com/forum/showthread.php?t=238702)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

  

> **[help me make flash clock ( not local pc time)](https://www.kirupa.com/forum/showthread.php?t=202172%5B/quote%5D)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [July 9, 2008, 2:39am UTC](https://forum.kirupa.com/t/date-countdown/265385/4 "2008-07-09T02:39:27Z")

</div>

It makes all the difference.

Your local (winter) time is taken off your machine but, in 100 days time or so, your locale will be in summer time hence the reason why it’s an hour out.

If you adjust your timer so that it counts down to next March (c.260 days) you’ll find that it’s still an hour out…but change your timer so that it counts down for a year and, as if by magic, it will be in time again. That hour difference is caused by the Flash Player making internal adjustments for daylight saving - check the entries in the Help files, specifically the ones for getTimeZoneOffset and Date.

Also note that different versions of the Player handle daylight savings in different ways, for example Flash Player 5 assumes that the transition dates between daylight savings time are the same as those in the US. This can lead to similar 1 hour differences for those parts of the world that transit to/from daylight savings time on a different date.

---

<div class="post-metadata">

**Author:** ![jake0037](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jake0037](https://forum.kirupa.com/u/jake0037)\
**Post date:** [July 9, 2008, 12:08pm UTC](https://forum.kirupa.com/t/date-countdown/265385/5 "2008-07-09T12:08:33Z")

</div>

Ahhh i get what you mean, thanks glosrfc

I looked through the forums and the help files and cant find a way to adjust for daylight savings

I will keep looking
