The ‘Summertime’ Bug

Some time ago, I tested a feature which was related to date of birth. On a web page, I had to fill in a date of birth, which could be displayed on an App in your handset. Both App and web site are from the same ’company’.
So I typed in my date of birth on the website, 27-08-1965. I opened the App, go to the profile information and looked for my date of birth. It displayed 26-08-1965. See picture below.

Birthday difference

Huh? Strange, what happened here? I checked in the log files and could see some transactions related to date of birth. One transaction which was of importance was the one send to the App, “birthday” = -137210400000. That is a unix timestamp, but it is negative. That is correct because it is before 1970, Unix zero time. I search with Google for a unix timestamp convertor. I used the epoch convertor [1] to do more investigation. I entered “-137210400” into the epoch convertor. It responded with the following

Time Stamp 27081965

Here I can see I have a difference of one hour. I entered the ‘Date’ (27-08-1965), the backend systems stored it as a ‘Unix Time stamp’. I collected the birthdate form the backend with the App and the App displays the (truncated) date of ‘Your Time Zone’.

I started to enter other dates on the web interface and displayed it on the App. I cross checked it with the epoch convertor. Some more results below.

Time Stamp 27081970

This looks good to me, so after Unix zero time, ‘Your Time Zone’ is correct displayed. My birthday of a recent date, e.g. 1986

Time Stamp 27081986

GMT has two hours difference, so that means …. ah!!! Summertime (or Daylight Savings Time). When was Summertime introduced? I looked it up again on Google. I ended up with a small article which helped me a lot, but it is in Dutch [2]. It stated there that Summertime was introduced again in 1977 as a result of the oil-crisis. Two things got my attention. Introduced in 1977 and introduced again.

Some boundary testing (in this case I checked on the ‘year’) is needed to do some checking. I checked my birthday for the years 1976 and 1977. They gave the expected results.

Time Stamp 27081976

Time Stamp 27081977

Need to investigate this further, because why do we have an error during my date of birth. I searched on Google by typing in the word ‘Summertime’.

The history of ‘Summertime’ revealed some interesting situations. In World War 1, The Netherlands decided to implement the ‘Summertime’ after some other countries decided to do so. During the summer, time was increased with one hour to save for fuel and energy. After the end World War 2, the ‘Summertime’ period was not implemented anymore.

I checked out my birth day, 27 Augustus, at the end of World War 2 to see if the conversion is working

Time Stamp 27081946

Time Stamp 27081945

I checked out my birth day, 27 Augustus, at the beginning of World War 2 to see if the conversion is working

Time Stamp 27081940

Time Stamp 27081939

Huh? What is this? Another interesting situation. Searching further on Google, revealed that after the Germans finished the Blitzkrieg in May 1940, the whole Western European continent was set to a new time zone in line with the time in Berlin, Germany. This was requested by the german generals to have clear communication about time related activities around the european continent. For The Netherlands that meant that a jump of 100 minutes was implemented on the night of May 16, 1940.

The 100 minutes jump (Look at ‘your time zone’)

Time Stamp 16051940 013959

The next second

Time Stamp 16051940 014000

Before the war, The Netherlands had its own time zone, Amsterdam time. And it had Summertime implemented since 1916.

This whole investigation resulted in a serious fix on several systems. I’m not going into details, but several parties where convinced by the story that something needed to be done to solve this problem. It was a trill to do this investigation.

Still I got the feeling that the epoch-converter used to convert the date to unix time stamp is not correct in certain situations. Summertime dates between 1946 and 1969 seems to have an incorrect offset of one hour.

[1] :

[2] :

Other references




2 Comments Add yours

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s