Help with a world time clock?
February 10, 2004 9:16 AM Subscribe
World clocks. I am trying to put together a clock application and can't work out how to discern the actual time is in each city. The time zone part is easy, but a great many countries (most?) use seasonal time adjustments. I have an online world clock on my screen and a physical one hanging above my head. How do they work?
Response by poster: Thanks. I have to admit I am not a programmer as such and didn't realise it was all built in. I'd just assumed from the start that seasonal time changes were movable feasts. No need to reinvent the wheel then. The clock as it stands is here, by the way.
posted by elliot100 at 10:24 AM on February 10, 2004
posted by elliot100 at 10:24 AM on February 10, 2004
Note that though they're there, they're not necessarily exposed or intended for your use. As said, I had to use a (not thread-safe) kludge to use the libc one, don't know what's possible with windows or MacOS 9.
posted by fvw at 10:28 AM on February 10, 2004
posted by fvw at 10:28 AM on February 10, 2004
« Older How Can I Ship a Family Antique Cross-Country? | Does anyone have experience creating their own... Newer »
This thread is closed to new comments.
Slightly more generally, every time standard consists of a few parameters, mainly offset to UTC and daylight savings time start/end. Given these parameters you can always compute the local time from UTC. If you don't want to punch in all this data yourself, either grab it from a piece of software like glibc, or just pull it from the OS you're using; Windows, MacOS and Unices all have conversion routines somewhere.
posted by fvw at 9:35 AM on February 10, 2004