Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

Solution to the timezone problem

Hixie has a brilliant solution to the time zone problem in the form of a clever piece of XBL by Nicolás Lichtmier. The small script can be bound to an element containing a date in UTC and will quietly replace it with the time in the user’s current timezone using Mozilla’s built in UTC handling functions. Naturally it only works in Mozilla, but I imagine the script could be emulated using Internet Explorer behaviors.

This is Solution to the timezone problem by Simon Willison, posted on 7th September 2002.

View blog reactions

Next: Excellent RSS tutorial

Previous: Pingback server code

4 comments

  1. Your pingback client is broken (which is why this entry didn't result in a pingback on my blog). Your blog said the link was:

    http:/ln.hixie.ch/?start=1031384833

    ...but it's not, it is missing the &count=1 bit at the end. My blog requires complete permalinks to acknowledge the ping. In case you don't log all failed responses, here's the response that my blog sent back:

    The given URI (http:/ln.hixie.ch/?start=1031384833) is not the permalink of a blog entry on this site.

    Ian Hickson - 7th September 2002 20:58 - #

  2. I tried both - not sure why it didn't work for either but I'll have another go now.

    Simon - 7th September 2002 21:08 - #

  3. heh, as per our e-mail discussion, your URI is also missing a slash at the beginning. Do you make these URIs up by hand or something? Just copy and paste the permalinks! ;-)

    Ian Hickson - 7th September 2002 23:21 - #

  4. Well... There's no need of either XBL or behaviours. It can be just done in an onload handler finding all the spans with className containing "date" (or "stamp"). XBL is just a bit cleaner (and it should be a bit faster I think).

    Nicolás - 9th September 2002 03:53 - #

Comments are closed.

Previously hosted at http://simon.incutio.com/archive/2002/09/07/solutionToTheTimezoneProblem

A django site