It is Windy in Aberystwyth

We don’t get wind in Oxford: not wind like this, anyway. The air is passionate and angry, full of bitter sea salt and wild energy. It smells like Aberystwyth… and still a little like “home”.

But this time I’m here as a visitor, of course. Just another tourist: and that’s a very strange and alien feeling, to me.

Traveling In Time(zones)

Just when you think you’ve got them figured out (and the application you’re working on is coping correctly with daylight saving time), something comes along and blows your little mind. Like this, for example:

Suppose you’re chilling out in Hawaii on some lazy Sunday. Cocktail in hand, you check your watch – it’s midday. Midday on Sunday – that means you’ve got a ‘plane to catch: you’re about to fly due South to the research station on Palmyra Atoll, part of the Line Islands. Palmyra Atoll, like Hawaii, is part of the United States, so you don’t even need your passport, but you pause for a moment to try to work out whether you need to adjust your watch…

A timezone map of the mid-Pacific Ocean, showing the islands in question.

When it’s midday on Sunday in Hawaii, what time is it in Palmyra Atoll (which is at essentially the same longitude)?

It’s midday… on Monday! The Line Islands are uniquely considered to be in the timezone UTC+14:00 (and Hawaii is in UTC-10:00), so despite the fact that the Line Islands are, on the whole, East of the Hawaiian islands, the whole cluster of them are an entire day ahead of Hawaii. Even those which are managed by the U.S. are closer to New Zealand (chronologically) than they are to any other U.S. terrirory (even though they’re more distant geographically). It’s no wonder people get confused by things like the International Date LineMagellan was apparently so confused by the fact that his ship’s log was a day out upon his return from a round-the-world trip that he wrote a letter to the Pope about the oddity.

Similarly, when the sun rises on the Line Islands, it marks the beginning of the day after the date that it rises on Hawaii, ten minutes later.

I find this particular quirk even more interesting than the similar one on the Diomede Islands (a pair of islands in the Bering Strait), sometimes called “Tomorrow Island” and “Yesterday Island”. The Diomedes are clearly separated in an East-West configuration, whereas the Line Islands are clearly to the South (and North) of islands which are still stuck in “yesterday”.

The Diomede Islands

In practice, apparently, the 4 – 20 scientists living at any given time on Palmyra Atoll work at UTC-11:00: only an hour from Hawaii – presumably so that they maximise the period that their work week lines up with that in the rest of the United States: but this only serves to exaggerate the phenomena: this means that you can hop from, say, Palmyra Atoll to nearby Teraina (population 1,155, about 150 miles away) and have to wind your watch forward by a massive 25 hours (or just one hour, I suppose).

By the time you’re living on a South Pacific island paradise, I suppose these things don’t matter so much.

http://en.wikipedia.org/wiki/Palmyra_AtollPalmyra Atoll
× ×

Parsing XML as JSON

This morning, I got an instant message from a programmer who’s getting deeply into their Ajax recently. The conversation went something like this (I paraphrase and dramatise at least a little):

Morning! I need to manipulate a JSON feed so that [this JSON parser] will recognise it.

Here’s what I get out of the JSON feed right now:

<?xml version="1.0" encoding="UTF-8"?>
<module-slots type="array">
  <module-slot>
    <title>Module3</title>
    ...

“Umm…” I began, not quite sure how to break this news, “That’s XML, not JSON.”

“Is that a problem?” comes the reply.