FORUMS: list search recent posts

clock displaying Pacific Daylight Time

COW Forums : Web Design

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stef Prein
clock displaying Pacific Daylight Time
on May 8, 2008 at 7:35:54 pm

For an internship in San Francisco, I'm moving from The Netherlands to California. I would like to display the PDT on my website. Does anyone know a JavaScript to do this?
Thanks in advance!

Return to posts index

Curtis Thompson
Re: clock displaying Pacific Daylight Time
on May 9, 2008 at 5:37:40 am


this is a slightly tricky thing to do in javascript, but certainly doable - here's a script that will get you started:

basically the concept is that you get utc (gmt) time and you subtract a specific amount of hours from it and then you have the time in that zone - that part is relatively easy, so the trickiness comes in making sure that you adjust for dst and the likes. i found the above script as an example and it will get you started, but just keep an eye on anything you do come this fall - or do research time zones in javascript, as it is relatively simple to write a function that determines if you are in dst or not and adjust clocks accordingly...

lemme know if you have additional questions!


Return to posts index

Stef Prein
Re: clock displaying Pacific Daylight Time
on May 12, 2008 at 4:09:30 pm

Hi Curtis,
Thanks for your help! I'll check it out!

Image and Media Technology
Utrecht School of the Arts
The Netherlands

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved