Ireland and the UK Aren’t In The Same Timezone!

This weekend, while investigating a bug in some code that generates iCalendar (ICS) feeds, I learned about a weird quirk in the Republic of Ireland’s timezone. It’s such a strange thing (and has so little impact on everyday life) that I imagine that even most Irish people don’t even know about it, but it’s important enough that it can easily introduce bugs into the way that computer calendars communicate:

Most of Europe put their clocks forward in Summer, but the Republic of Ireland instead put their clocks backward in Winter.

If that sounds to you like the same thing said two different ways – or the set-up to a joke! – read on:

Map showing timezones of Europe. The UK and Ireland are grouped (along with Iceland) in a zone labelled as being UTC+0.
The timezones of Europe look pretty simple compared to some parts of the world, but the illustration of the British Isles hides an interesting eccentricity.

A Brief History of Time (in Ireland)

Poster titled "Time (Ireland) Act 1916", advising that "On and after Sunday 1st October 1916 Western European Time will be ovserved throughout Ireland" asking people to set their clocks and watches back 35 minutes.
Spring forward, fall back… just a little bit back, though. Not too much.

After high-speed (rail) travel made mean solar timekeeping problematic, Great Britain in 1880 standardised on Greenwich Mean Time (UTC+0) as the time throughout the island, and Ireland standardised on Dublin Mean Time (UTC-00:25:21). If you took a ferry from Liverpool to Dublin towards the end of the 19th century you’d have to put your watch back by about 25 minutes. With air travel not yet being a thing, countries didn’t yet feel the need to fixate on nice round offsets in the region of one-hour (today, only a handful of regions retain UTC-offsets of half or quarter hours).

That’s all fine in peacetime, but by the First World War and especially following the Easter Rising, the British government decided that it was getting too tricky for their telegraph operators (many of whom operated out of Ireland, which provided an important junction for transatlantic traffic) to be on a different time to London.

1885 GPO telegraph instrument from the Porthcurno Telegraph Museum, which Dan almost visited the other week but it was closed.
It’s widely believed that the world’s first “U UP? [STOP]” message never got a response as a direct result of Anglo-Irish timezone confusion.
So the Time (Ireland) Act 1916 was passed, putting Ireland on Greenwich Mean Time. Ireland put her clocks back by 35 minutes and synched-up with the rest of the British Isles. And from then on, everything was simple and because nothing ever went wrong in Ireland as a result of the way it was governed by by Britain, nobody ever had to think about the question of timezones on the island again.

Ah. Hmm.

December 1920 photograph showing St Patrick's Street, Cork, following the burning of the city by British forces.
“Those Irish people want to govern their own country, do they? After we so kindly shared our king with them? Right-ho: let’s set fire to their cities and see how they feel then.”

Following Irish independence, the keeping of time carried on in much the same way for a long while, which will doubtless have been convenient for families spread across the Northern Irish border. But then came the Second World War.

Summers in the 1940s saw Churchill introduce Double Summer Time which he believed would give the UK more daylight, saving energy that might otherwise be used for lighting and increasing production of war materiel.

Ireland considered using the emergency powers they’d put in place to do the same, as a fuel saving measure… but ultimately didn’t. This was possibly because aligning her time with Britain might be seen as undermining her neutrality, but was more likely because the government saw that such a measure wouldn’t actually have much impact on fuel use (it certainly didn’t in Britain). Whatever the reason, though, Britain and Northern Ireland were again out-of-sync with one another until the war ended.

Newspaper clipping advising that "Double Summer Time comes to an end on Saturday night, August 8-9, when all clocks and watches should be put back one hour, thus reverting to British Summer Time, which will probably be maintained throughout the winter."
I like to imagine that the development of powerful computers by the folks at Bletchley Park was

From 1968 to 1971 Britain experimented with “British Standard Time” – putting the clocks forward in Summer once, to UTC+1, and then leaving them there for three years. This worked pretty well except if you were Scottish in which case you’ll have found winter mornings to be even gloomier than you were used to, which was already pretty gloomy. Conveniently: during much of this period Ireland was also on UTC+1, but in their case it was part of a different experiment. Ireland were working on joining the European Economic Community, and aligning themselves with “Paris time” year-round was an unnecessary concession but an interesting idea.

But here’s where the quirk appears: the Standard Time Act 1968, which made UTC+1 the “standard” timezone for the Republic of Ireland, was not repealed and is still in effect. Ireland could have started over in 1971 with a new rule that made UTC+0 the standard and added a “Summer Time” alternative during which the clocks are put forward… but instead the Standard Time (Amendment) Act 1971 left UTC+1 as Ireland’s standard timezone and added a “Winter Time” alternative during which the clocks are put back.

Two clocks, both showing the same time. One has a sign reading "LONDON", the other "DUBLIN, I GUESS?"
It all seems so simple until you actually think about it.

(For a deeper look at the legal history of time in the UK and Ireland, see this timeline. Certainly don’t get all your history lessons from me.)

So what?

You might rightly be thinking: so what! Having a standard time of UTC+0 and going forward for the Summer (like the UK), is functionally-equivalent to having a standard time of UTC+1 and going backwards in the Winter, like Ireland, right? It’s certainly true that, at any given moment, a clock in London and a clock in Dublin should show the same time. So why would anybody care?

Perl Data::ICal::TimeZone implementation of Dublin timezone, incorrectly showing summer DST at +1 rather than winter DST of -1.
This code for Europe/Dublin, from the Perl module Data::ICal::TimeZone, is technically-incorrect because it states that the winter time is the standard and daylight savings of +1 hour apply in the summer, rather than the opposite.

But declaring which is “standard” is important when you’re dealing with computers. If, for example, you run a volunteer rota management system that supports a helpline charity that has branches in both the UK and Ireland, then it might really matter that the computer systems involved know what each other mean when they talk about specific times.

The author of an iCalendar file can choose to embed timezone information to explain what, in that file, a particular timezone means. That timezone information might say, for example, “When I say ‘Europe/Dublin’, I mean UTC+1, or UTC+0 in the winter.” Or it might say – like the code above! – “When I say ‘Europe/Dublin’, I mean UTC+0, or UTC+1 in the summer.” Both of these declarations would be technically-valid and could be made to work, although only the first one would be strictly correct in accordance with the law.

Stressed programmer hunched over a MacBook. Photo by Anna Shvets from Pexels.
Clients who need solid timezone support represent 50% of a programmer’s production of stress hormones. See also Falsehoods Programmers Believe About Time.

But if you don’t include timezone information in your iCalendar file, you’re relying  on the feed subscriber’s computer (e.g. their calendar software) to make a sensible interpretation.. And that’s where you run into trouble. Because in cases like Ireland, for which the standard is one thing but is commonly-understood to be something different, there’s a real risk that the way your system interprets and encodes time won’t necessarily be the same as the way somebody else’s does.

If I say I’ll meet you at 12:00 on 1 January, in Ireland, you rightly need to know whether I’m talking about 12:00 in Irish “standard” time (i.e. 11:00, because daylight savings are in effect) or 12:00 in local-time-at-the-time-of-the-meeting (i.e. 12:00). Humans usually mean the latter because we think in terms of local time, but when your international computer system needs to make sure that people are on a shift at the same time, but in different timezones, it needs to be very clear what exactly it means!

And when your daylight savings works “backwards” compared to everybody else’s… that’s sure to make a developer somewhere cry. And, possibly, blog about your weird legislation.

Counting Down

I wasn’t sure that my whiteboard at the Bodleian, which reminds my co-workers exactly how many days I’ve got left in the office, was attracting as much attention as it needed to. If I don’t know what my colleagues don’t know about how I do my job, I can’t write it into my handover notes.

You have [20] work days left to ask Dan that awkward question.
Tick, tick, tick, tick, boom.
So I repurposed a bit of digital signage in the office with a bit of Javascript to produce a live countdown. There’s a lot of code out there to produce countdown timers, but mine had some very specific requirements that nothing else seems to “just do”. Mine needed to:

  • Only count down during days that I’m expected to be in the office.
  • Only count down during working hours.
  • Carry on seamlessly after a reboot.

Screen showing: "Dan will be gone in 153 hours, 54 minutes, 38 seconds."
[insert Countdown theme song here]
Naturally, I’ve open-sourced it in case anybody else needs one, ever. It’s pretty basic, of course, because I’ve only got a hundred and fifty-something hours to finish a lot of things so I only wanted to throw a half hour at this while I ate my lunch! But if you want one, just put in an array of your working dates, the time you start each day, and the number of hours in your workday, and it’ll tick away.

The 500-Year-Long Science Experiment

This article is a repost promoting content originally published elsewhere. See more things Dan's reposted.

The 500-Year-Long Science Experiment (The Atlantic)

In 2014, microbiologists began a study that they hope will continue long after they’re dead.

In the year 2514, some future scientist will arrive at the University of Edinburgh (assuming the university still exists), open a wooden box (assuming the box has not been lost), and break apart a set of glass vials in order to grow the 500-year-old dried bacteria inside. This all assumes the entire experiment has not been forgotten, the instructions have not been garbled, and science—or some version of it—still exists in 2514.

This is a biology experiment that’s planned to run for half a millenium. How does one even make such a thing possible?

Thinking about the difficulties in constructing a message that may be understood for generations into the future reminds me of the work done on a possible marking system for nuclear waste disposal (which would need to continue to carry the message that a place is dangerous for ten thousand years).

This kind of philosophical thinking may require further work, though, if we’re ever to send spacecraft on interstellar journeys: another kind of “long” experiment. How might we preserve the records of what we’ve done, so that our descendants have the opportunity to continue our work, in a way that promotes the iterative translation and preservation of the messages that are required to support it? For example: if an experiment is to be understandable if rediscovered after a hypothetical future dark age, what precautions do we need to take today?

Time

My name is Dan, and I am a chronogoldfish.

Is this a chronogoldfish? I don't know. And neither do you. I just made them up.

You see: the thing that goldfish are famous for – except for their allegedly very short memory, which is actually a myth – is that they grow to fill the available space. That is: if you keep a goldfish in a smaller tank, it’ll grow to a full-size that is smaller than if you kept it in a larger tank or even a pond. I’m not certain that’s actually true either, and I’m sure that Kit will correct me pretty soon if it’s not, but it’s part of my analogy and I’m sticking with it.

A chronogoldfish, then, is somebody who grows to fill the available time. That is: the more free time you give them, the more they’ll work at filling it up. This is a mixed blessing, which is a euphemism for “usually pretty bad.” You’ll almost never catch me bored, for example – I’ve no idea how I’d find time to be bored! – but conversely it’s reasonably rare to find me with free time in which I don’t have something scheduled (or, at least: in which I don’t have something I ought to be doing).

Earlier this year, I started working for the Bodleian, and this – along with a couple of other changes going on in my life, suddenly thrust upon me several hours extra in each week than I’d had previously. It was like being transplanted from a tank… into a pond and – once I’d stopped checking for herons – I found myself sitting around, wondering what to do with my sudden surge of extra free time. But then, because I’m a chronogoldfish, I grew.

The activities that I already did became bigger – I took on more responsibilities in my voluntary work, took more opportunities to socialise with people I spend time with, and expanded my efforts to develop a variety of “side project” software  projects. I’ve even lined myself up for a return to (part-time) education, later this year (more on that in another blog post, little doubt). And so, only a few months later, I’m a big, fat chronogoldfish, and I’ve once again got just about as little “free” time – unplanned time – as I had before.

But that’s not a bad thing. As Seth Godin says, wasting time (properly) is a good thing. And there’s little doubt that my growth into “new” timesinks is productive (education, voluntary work), experimental (side-projects, education), and joyful (socialising, everything else). I’d like to think I use time well, even if I do sometimes wonder: where did it all go?

I suppose the opposite of a chronogoldfish might be a chronomidget: somebody who doesn’t grow to consume any more time than they have to. The test, I suppose, would be to ask yourself: what would you do if there was an extra half-hour in the day? If your brain immediately rushes to fill that space with an answer (a genuine answer: something you’d actually do – there’s no point lying to yourself and saying you’d spend it at the gym if you wouldn’t!), you’re probably a goldfish. If not, you’re probably a midget.

I think I can name people among my friends who are goldfish, and people who are midgets. But I do wonder what type they would say that they are…

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

A Primer Puzzle

There’s a film that I’m a huge fan of, called Primer. Since I first discovered it I’ve insisted on showing it at least twice at Troma Night (the second time just for the benefit of everybody who didn’t “get it” – i.e. everybody – the first time). If you haven’t already seen it, this post might be a little spoilery, so instead of reading it, you should warm up your time machine, go and watch the film, turn off the time machine, get into the time machine, come out again right now, and then read its Wikipedia page until you understand it. Then come back.

Time Travel in Primer. Click to embiggen.

Still with me? Right.

Why Primer is awesome, and why you should care

In Primer, the protagonists accidentally stumble across the secret of time travel and use it to cheat the stock market. The film isn’t actually about time travel or science-fiction: it’s actually about the breakdown in the relationship between the protagonists, but it’s got some pretty awesome science-fiction in it, too, and that’s what I’d like to talk about. The mechanism of time travel in Primer, for example, is quite fascinating: the traveler turns on the machine using a timer switch (turning it on in person risks the possibility of meeting a future version of themselves coming out of the machine). They then wait for a set amount of time, then they turn off the machine, get into it, wait for the same amount of time again, and emerge from the time machine at the moment that it was turned on.

This is a lot weaker than many of the time travel devices featured in popular science fiction literature, films, and television. It’s not possible to travel forwards in time (except in the usual way with which we’re familiar). Travelling backwards in time takes as long as it took the machine to travel forwards through the same period, making long journeys impossible. The machine has to be strategically turned on at the point at which you want to travel back to, reducing spontaneity, and it can’t be used again in the meantime without resetting it. Oh, and the machine is dangerous and causes long-term damage to humans travelling in it, but that’s rather ancillary.

There’s a certain believability to the time travel mechanic in Primer that gives it a real charm. As far as it is explored in the film, it permits a deterministic universe (so long as one is willing to be reasonably unconventional with one’s interpretation of the linearity of time, as shown in the diagram above), provides severe limits to early time travel (which are great for post-film debate), and doesn’t resort to anything so tacky as, for example, Marty McFly gradually “fading out” after he inadvertently prevented his parents from getting together in Back to the Future.

Marty begins to disappear. I love this film, too, but not even slightly for the same reasons.

Experiments in the Primer universe

I’ve recently been thinking about some of the experiments that I would be performing it I had been the inventor of the Primer time machine.

First and foremost, I’d build a second, smaller time machine of the same design. We know this to be possible because the first machine built by the protagonists is smaller than the ones they later construct. I want to be able to put one time machine inside another. Yes, yes, I know that this is what the protagonists do in the movie, but mine has a difference: mine is capable of being operated (power supply only needs to be a few car batteries, as we discover in the film) within the larger time machine. That’s right, I’m building a time machine inside my time machine.

  • Experiment One attempts to explore the relativism of time. Start the larger time machine and warm it up. Stop the larger time machine. Start the smaller time machine. Get into the larger time machine, carrying the smaller time machine, and travel back. Once back, turn off the larger time machine. Experiment with sending things forwards in time using the second time machine (which has traveled backwards in time but while running, from our frame of reference). If objects inserted into it come out in the future, before it is picked up, this implies that there might be a fixed frame of reference to chronology. It also indicates that it is possible to build a machine for the purpose of traveling forwards in time, too, although only – for now – at the usual rate.
  • Experiment Two attempts to accelerate the rate at which a traveler can move forwards or backwards through time. Based on the explanation given in the movie, the contents of the time machine oscillate backwards and forwards through the period of time between their being turned on and being turned off, for a number of repetitions, before settling. If we are able to synchronise the oscillations of two time machines, one inside the other (by turning them on and off simultaneously, using timers attached to each and their own distinct, internal, power supplies), might we be able to set up a scenario that, in X minutes, switches off, and we can get inside the inner machine and travel back to the switch-on time in X/2 minutes? If so, what happens if we send such a two-machine construction back in time as in Experiment One – do we then have a “time accelerator”?
  • Experiment Three takes advantage of the fact that for an object within the field, an extended period of time has passed (during the oscillations), while from the reference point of an external observer, a far shorter period of time has passed. Experiment with the use of an oscillating time period field to accelerate slow processes. Obvious ones to start with are the production of biologically-produced chemicals, as is done in the film (imagine being able to brew a 10-year-old whiskey in a day!), but there are more options. Processing time on complex computer tasks could be dramatically reduced, for example. Build a large enough time machine and put a particle accelerator in it, and you can bring masses up to relativistic speeds in milliseconds.
  • Experiment Four is on the implications on spacetime of sending mass back in time. As we know, flinging mass in a direction of space produces an equal and opposite acceleration in the opposite direction, as demonstrated by… well, everything, but let’s say “a rocket” and be done with it. Does flinging mass backwards through time produce an acceleration forwards through time? This could be tested by sending back a mass and a highly-accurate timepiece, removing the mass in the past, and letting the timepiece travel back to the future. The timepiece is checked when the experiment starts, when the mass is removed, and when the experiment ends. If the time taken for the second half of the experiment, from the perspective of the timepiece, is longer than the time taken for the first half, then this implies that Newtonian motion, or something equivalent, can be approximated to apply over time as well as space. If so, then one could perhaps build an inertia-generating drive for a vehicle by repeatedly taking a mass out of one end of a time machine, transporting it to the other, and sending it back in time to when you first picked it up.

The scientific possibilities for such a (theoretical) device are limitless.

But yeah, I’d probably just cheat the stock market, too. At least to begin with.

Kissing At Midnight

In a fleeting thought, as I passed the greengrocer hanging our mistletoe outside his shop this morning, I found myself thinking about the unusual situation I’m in, in that I’ll this year be spending New Year’s Eve with both of mygirlfriends.

Who do I kiss at midnight?

Thankfully, the solution is clear – this year at least – thanks to the fact that midnight will happen twice this year (there’s a leap second). With some careful orochestration of who kisses whom when, they can have a midnight each, and use each of their other midnight’s to kiss their respective other partners.

Like I said: a fleeting thought – I don’t lie awake worrying about this kind of thing. That would just be weird.