A Day Has Only 24±1 Hours
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Subtitle |
| |
Title of Series | ||
Number of Parts | 118 | |
Author | ||
License | CC Attribution - NonCommercial - ShareAlike 3.0 Unported: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this | |
Identifiers | 10.5446/44820 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
| |
Keywords |
00:00
Multiplication signTime zoneMetropolitan area networkGoodness of fitBitGrand Unified TheoryLecture/Conference
00:39
EstimationCentralizer and normalizerOpen sourceMultiplication signSoftwareSlide ruleSoftware developerWave packetDaylight saving timeTime zoneVideo gameGoodness of fitOrder (biology)2 (number)Ocean currentGame theoryCodeLibrary (computing)Computer animation
02:07
InformationDifferent (Kate Ryan album)Attribute grammarTime zoneObject (grammar)Multiplication signServer (computing)DigitizingNeuroinformatikOcean currentMoment (mathematics)Similarity (geometry)ResultantException handlingComputer clusterContext awarenessXML
03:52
Object (grammar)Multiplication signInformationCentralizer and normalizerTime zoneDaylight saving time
04:26
CASE <Informatik>Object (grammar)Axiom of choiceMultiplication signConstructor (object-oriented programming)Field (computer science)ResultantLibrary (computing)Attribute grammarInformation2 (number)Time zoneEstimationDigitizingTheoryComputer animation
05:51
Object (grammar)Time zoneInformationLocal ringMultiplication signExistenceVariable (mathematics)Daylight saving timeCentralizer and normalizerDigitizingComputer animation
06:40
Multiplication signInterpreter (computing)NumberTime zoneCodeInformationObject (grammar)String (computer science)Standard deviationLibrary (computing)Field (computer science)Local ringOcean currentDaylight saving timeCentralizer and normalizerWritingXML
08:37
InformationLine (geometry)Code2 (number)NeuroinformatikMoment (mathematics)Computer animation
09:11
Multiplication signException handlingRun time (program lifecycle phase)NeuroinformatikServer (computing)Standard deviationOperator (mathematics)Software testingTime zonePhysical systemDifferent (Kate Ryan album)Object (grammar)DampingIntegerInformationRandomization2 (number)Extension (kinesiology)Negative numberPattern languageString (computer science)Functional (mathematics)Parameter (computer programming)Library (computing)XML
11:39
Multiplication signWave packetTrailPosition operatorSpecial unitary groupArithmetic meanStandard deviationTime zoneDifferent (Kate Ryan album)Solar timeOscillationDegree (graph theory)Centralizer and normalizerAngleFood energyDistanceOcean currentNichtlineares GleichungssystemRotationDialectCollisionNumberLocal ringComputer animation
16:18
Time zoneDaylight saving timeMultiplication signTime zoneDialectLatent heatFlow separationDifferent (Kate Ryan album)InformationGraph coloringArrow of timePivot elementComputer animation
17:49
Time zoneInformationWebsiteFile archiverComputer fileDifferent (Kate Ryan album)NumberLibrary (computing)Source codeSimilarity (geometry)AuthorizationGastropod shellScripting languageDatabaseAssociative propertyEmailMultiplication signCodeOperating systemRight anglePhysical systemAdditionElectronic mailing listRevision controlReading (process)Programming languageLine (geometry)InternetworkingException handlingDaylight saving timeArithmetic meanComputer programmingParsingTime zoneComputer animation
20:16
Hill differential equationMaxima and minimaTime zoneMultiplication signDaylight saving timeRule of inferenceBitLine (geometry)WordLibrary (computing)MathematicsDirection (geometry)Standard deviationCodeHydraulic jumpDifferent (Kate Ryan album)Object (grammar)MultilaterationArithmetic meanCentralizer and normalizerSpectrum (functional analysis)Maxima and minimaCartesian coordinate system2 (number)Local ringDisk read-and-write headRandomizationSphereFreewareTheoryDiagram
26:00
BitMultiplication signLink (knot theory)Time zoneGraph (mathematics)Daylight saving timeElectric generatorOrder (biology)Computer fileNumberComputer clusterReal numberSystem callMereologyTheoryCentralizer and normalizer2 (number)Line (geometry)CodeRule of inferenceMultilaterationDiagram
29:19
UsabilityArithmetic mean2 (number)Formal languageRule of inferenceMultiplication signCentralizer and normalizerDaylight saving timeStandard deviationLocal ringMedical imagingXML
30:25
Physical lawControl flowMultiplication signDaylight saving timeException handlingTime zoneDeclarative programming
31:42
Time zoneUniform resource locatorDaylight saving timeCellular automatonSystem programmingLocal ringState of matterStandard deviationDecision theoryTwitterFood energyContinuous functionGoogolSource codePRINCE2Web pageRule of inferenceDaylight saving timeAuthorizationInformationSource codeTelecommunicationState of matterPhysical systemDatabaseLocal ringGroup actionMultiplication signService (economics)Time zoneMathematicsProcess (computing)Computer fileLink (knot theory)EmailRule of inferenceStandard deviationElectronic mailing listProbability density functionSineWeb pageCodeMereologyDifferent (Kate Ryan album)Uniform resource locatorWordRevision controlPoint (geometry)MultilaterationXMLUML
36:17
Time zoneInformationTime zoneDifferent (Kate Ryan album)Daylight saving timeCentralizer and normalizerMultiplication signRule of inferenceStandard deviationComputer animation
37:25
Line (geometry)Combinational logicMaxima and minimaTime zoneRevision controlSystem callDaylight saving timeLipschitz-StetigkeitRule of inferenceInformationFile archiverNP-hardPhysical systemXMLComputer animation
38:52
Musical ensembleMultiplication signComputer virusData miningDaylight saving timeTime zoneDifferent (Kate Ryan album)Presentation of a groupImplementationMoment (mathematics)Shared memorySlide ruleLecture/Conference
40:28
Pivot elementObject (grammar)Attribute grammarDaylight saving timeTime zoneImplementationMultiplication signReal-time operating systemLocal ringObservational studyLecture/Conference
41:37
Time zoneOperating systemUtility softwareCodeSet (mathematics)Distribution (mathematics)Library (computing)Uniqueness quantificationPhysical systemTorusLine (geometry)NeuroinformatikOcean currentInformationRevision controlMultiplication signDifferent (Kate Ryan album)Right angleLecture/ConferenceComputer animation
43:22
CalculationSet (mathematics)Standard deviationLibrary (computing)FrequencyInformationRoundness (object)Multiplication signObservational studyLecture/Conference
Transcript: English(auto-generated)
00:05
Guten Morgen. Usch munglich waltig mein Vortig auf Schweizer deutsch machen, aber gut imit meinem Hochdeutsch habe hier eigenlich nicht zu zu zuchen. And there's a reason why I'm going to speak in English. A day is only 24 plus or minus one hour, and I have much less time to talk to you a little bit
00:23
about how to check the time, that you shouldn't check the current time too often, and that you should check what your government does. My name is Miroslav Shedivy. I was born in Bratislava in Czechoslovakia, which is currently the time zone Europe Bratislava. Studied in France at Insoléon,
00:42
which is the time zone of Europe, Paris. And now I am working as a senior software developer for Zlute Game Beha in Karzure, just one and a half hour train ride from here to the north, which is time zone of Europe, Berlin. It looks like that I have spent my whole life in the Central European time zone,
01:00
and that I have not so much to speak about it, but actually in our company Zlute, which stays behind the Germany's largest price comparing website, Billigadee. We use Python and a lot of other open source software technologies, and we have a lot to do with time as well. If you would like to come to the place where both bicycle and car were born,
01:22
and to the region of the best German wine and the best French beer, just speak to me after the talk or to my colleagues. Okay, I'm not going to do any live coding, but I have to do something with time, so please set your time to 10.33
01:42
Central European Summer Time here in Basel, in Switzerland, Thursday 11th of July, because all the following slides will concern exact this time. When you are using Python, and you want to get the current time, you can import the standard daytime library, and then do daytime daytime now, and you will get the current time with year, month, day, hour, minute, second, microsecond,
02:05
so 10.33, but this is not what you want to do, because on your computer, this is what you get. On a server set to UTC, you will get a similar daytime object that is offset by two hours because it's set to UTC, and you see no difference between these two objects,
02:22
except for two hours offset in the hours. So if you compare these two daytime objects, you'll have a offset of two hours, although they have been created at the same moment, so you don't want to do this, because you don't know what time zone your server is on, or computer, and you will get different results, so don't use daytime daytime now.
02:42
You can use daytime daytime UTC now, which will return also a daytime object, always in UTC, so you see there is 8.33, so the current time in UTC. That's great, this is what you get on every computer, but in Python, explicitly better than implicit, because here in implicitly you see,
03:01
you know implicitly that you are in UTC, but it is not in the object itself. So what you can do in Python 3, you can tell now, and then tell the computer, I want daytime time zone UTC. I want the current time in the UTC time zone. This time, you can use now method, because you give it a time zone,
03:22
it will return daytime object that is time zone aware. It means that it knows that it is in some time zone, and with this object, with this daytime object with this info attribute set, you have an exact daytime object, and you know what time is it, exact time, which is the same on every computer,
03:42
and you know also in which time zone it is, so this is completely explicit and perfect, but we are now here in Bazel, and we now know the current time here. It is not 8.33, it's 10.33, so what you can do, you do the same, you create a new time zone, which is defined by the time delta object of two hours offset, and then you get the current time
04:03
with the information we are two hours ahead of UTC, and it is 10.33. Okay, but we know that now we are in the Central European summertime, so two hours ahead of UTC, but in winter, or 2022, or 1970, what was the time, we don't know whether
04:21
we were two hours ahead of UTC or not, so you have to reach out for a third party library, PYTZ is the best choice, the standard choice, and in this case, if you ask now, PYTZ time zone, Europe Zurich, you define this Zurich time zone, or you define, you use it, then you will get a daytime object,
04:41
10.33 correctly, and in the TZ info field, there is Zurich with two hours ahead of UTC, and now you have an object that is perfectly defined as the local time here in Zurich, or here in Switzerland. So, this is how we get the current time, but maybe you sometimes want to,
05:01
sometimes you want to define the time literally, so create a new daytime object, but not the current time, but define it with all the attributes, and then you use the daytime object constructor, and you define all the fields, year, month, day, hour, minute, second, microsecond,
05:21
and the last field is a time zone, but if you did, and you say, I want today 10.33 in Zurich, the result you will get is a daytime object, but what you see in the TZ info, there is Europe Zurich, but there is no CEST plus two hours, there is some LMT and 33 minutes,
05:41
34 minutes, what's that? That's something that we are going to have a look at later, but if you convert this to UTC, you will get the current time, 10.33, or the current time 10.33, but not in the Central European summertime, but in some non-existent time zone
06:01
that is 34 minutes ahead of UTC, so we don't want to do this. If you want to literally create a daytime object and give it a time zone information, you have to create a daytime object that is time zone naive, it means you create daytime with all the information here, day, month, and so on, without the TZ info, and then you pass it to a time zone object
06:23
using the localize method, and this way you will get the right object, and you see in the TZ info, there is Central European summertime, two hours ahead of UTC. Okay, now let's say that our current time with the Zurich information is in the variable now, and we want to add some time delta offset,
06:45
184 days, which is approximately six months, and then we will get a new object on the 11th of January 2020, 10.33, but what you see in the TZ info, there is again Central European summertime, although in January,
07:00
there is Central European standard time, or only Central European time, with one hour ahead of UTC, but here you get two hours ahead of UTC, so this is also actually wrong, the interpreter thinks that in January we are using, we are at the same time zone offset like now in July, so you don't, if you use now, if you take this object and then you normalize it
07:21
using your time zone object, you will get 11th of January, time zone is the standard time, one hour ahead of UTC, but you will get in the hour field, you will get nine o'clock, one hour less, because actually if now you add 184 times 24 hours,
07:42
you will get really one hour less in your time information, so if you want to add really wall clock, it's 10.33, you want to add some number of days and then get a date with the same wall time, wall clock time, you will have to take the now, replace the TZ info, remove the time zone information,
08:02
then add those days and then localize it again and you will get the January time at 10.33 in the standard time. Please don't write everything down, just have a look at the normalize and localize methods of PYTZ library.
08:20
Okay, so now for the next information, I will just jump away from the time zones, there is one thing that I wanted to show you, let's say we have this piece of code, we need two strings, we want one string with the current date and we want a string with current day of the week, so we want 11th of July and Thursday. With these two lines of code, it's easy,
08:42
you can read it very well, but this code will break, this code will give, not break, but it will give you false information or information that you don't expect and at that moment, very probably you are not sitting in front of your computer. Imagine I start these two lines of code one microsecond before midnight.
09:02
The first line of code executes on Thursday, 11th of July, the second line of code executes the next day, you will get already Friday, so you will get two time informations that are actually not from the same day. What you want to do is to have a look at your clock only once,
09:20
you check the current time, you save it into variable and in your logical step in one function, you work then with this now information. If we have a method, the best way is to pass the current time as a parameter, then it will be testable much easier because you can fake the current time and then test it much better.
09:42
So check the current time only once. On the other hand, there is one exception when you want to check for the current time more often, it is if you want in your runtime, evaluate some runtime information, for example, some expensive operation like download, you want to evaluate how fast your download
10:00
or some operation is, you get the current time at the beginning, at the end, you subtract these two daytime objects and then with total seconds, you will get a float with the time difference. But creating a daytime object with all this year and so on just to check the delta between two operations, that's not probably what you really need because okay, it takes some time
10:21
and you don't need to initiate daytime objects always, so we can use the standard time library, time.time, expensive operation, again time.time, you get two floats, this difference between them and you're done. The problem is that this can go wrong. Imagine that during your expensive operation,
10:43
your NDP date server runs, so it means that the system clock of your computer will get updated and if it was too fast before and then the clock will be turned back time by a few seconds, it can happen that your start happens after end and then elapsed is actually a negative number.
11:03
You don't want to program this because you cannot really test it, it can happen at any time and it can have some very bad consequences. So what you want to use is monotonic in Python 3 and monotonic returns some float that is guaranteed to be monotonically increasing. It means that no matter what happens with your system clock,
11:20
your end happens always after the start. If you are in the Python 3.7, you can even do monotonic in nanoseconds and you get an integer in nanoseconds. So this was Python. Let's get back to the time zones. How would you measure time a few centuries ago?
11:41
You could have a look at the sun when it is at the highest position, that's noon. Another day, again, noon. The difference between the two is probably 24 hours. That's wrong. There is equation of time. Probably on some wall clocks, sun dials and so on, you have already seen something like an eight.
12:01
This eight, this is equation of time and it defines that the rotation of Earth around sun or the positions mean that our mean, the sun position is not every day at noon at its highest position and it can oscillate here in Switzerland in our latitude by about plus or minus 15 minutes
12:22
during a year. So it means that during a year, every day, every solar day is not 24 hours long. That's why people statistically, they calculated that we have to take something like a mean time and this is where this mean in the world of GMT, Greenwich Mean Time or LMT, local mean time and so on,
12:41
this mean time comes from. It means that during a year, we just forget about all these oscillations, we calculate all these oscillations of the sun position and then we have a solar noon which is approximately 24 hours after each other. Okay, so that's okay. This is how you can get the current local time
13:01
but then later with all the ships' travels around the world in Atlantic Ocean, people wanted to get the current position. The current position, to get the current latitude is not so difficult because you see the sun at this height's position and you know, okay, it is at this height's position, this angle, I know how far in the north or south I am
13:21
but the latitude, you can get now, it is the local noon here but I have to know what current time, for example, in Paris or London is so I can calculate my distance from these cities. The problem is that for many centuries, you were not able to get a clock with you on a ship because all these sand, water, clocks,
13:41
they didn't work exactly and even pendulum clock doesn't work on a moving ship. So it took quite a long time and it cost a lot of money and energy to develop a clock that you could take with you. So this was on the sea but then even on earth, you need something like coordinated time. You have to know what time is it somewhere else.
14:01
In the beginning of the railroad in USA, they just, everybody, every city was using their local time and the problem was that once, not only once but at least several times, there were trains on a single track that just started at the same time and there were even some collisions and some death because they didn't know what time is it exactly in this other city and according to their timetables,
14:22
they just sent two trains at the same time on a single track. And then later, people saw that the government saw that they have to coordinate this time and then there were some regional or national times that were developed. There was Greenwich, France, of course, they had their own time.
14:43
The French railroad, what they did, they took the, for the standard railroad time, they took the Paris time and they added five minutes to that and that was the French standard railway time. The five minutes was there only to allow late passengers to get to their train
15:01
but it was abolished after several years and then France used a single time and then they moved to GMT to the Greenwich time. And this is how, okay, this is how Europe looked like at the beginning of the 20th century, at least the time zones. Of course, the borders of the countries
15:20
were a little bit different but this is actually how it should look like today because you have Greenwich at zero, one hour further, 15 degrees, we are actually in Prague and the border between them as, the border like the middle way between them is at the seven and a half degrees which is actually around the border
15:41
between Germany, Switzerland, Italy and Benelux and France. But as we know, in 1940, Hitler invaded Benelux and France so he took them to Central European time and Franco in Spain thought, oh, that's cool, we are going to do it again as well and that's how it remained but yeah.
16:02
So this is, the time zones actually could be like Greenwich and then plus minus 12 hours so 25 time zones around the world but it's a lot like this. If you import PYTZ and you ask what is the number of the time zones, you will get 440. So you have seen like Europe, Zurich, Berlin, Paris,
16:23
Bratislava and so on. All these are separate time zones but which means that they are not really, all these cities in Central Europe have now the current time and they switch to daylight saving time at the same, on the same date but these time zones, how are they defined? They are defined like every place,
16:42
every country, largest city is defined as a separate time zone and within countries, if there are more regions that followed different time zone, different daylight saving time start and since 1970, they will be listed
17:01
as a separate time zone. 1970, this means that you can more or less rely on PYTZ using the times from 1970. It contains all the, most of the information also from before 1970 but they are not listed as separate time zones and we are going to look at that more specifically.
17:22
So these are the time zones in the world. Same color means the same time now. So you see Europe blue, our Central Europe has the same time as Eastern Africa because we are now one hour ahead, more to our standard time. Even Antarctic has several time zones.
17:43
Where does this come from? I told you about PYTZ, you tell me, no, no, no, I know Eero, I know Delorean, I know that. Okay, you can use any library you wish but all of them will be based on this information coming from IANA which is Internet Assigned Numbers Association.
18:01
This is not an authority like United Nations, this is like only an association that observes all this information and they list it on their website and this is what all the operating systems except for MS-DOS and similar use this. So UNIX, all the systems, they are based on this.
18:22
If you go to this website, you will find two things. There is an archive, a downloadable file with the edition of the TISI data and there is a mailing list. You can see the archives and you can also sign up and follow it.
18:40
And this mailing list is actually something that is the source of this whole information. In this mailing list, people write, oh, our government is going to switch to Daylight Saving Time next year or we are going to abolish it or I have read something. Or I have found an information that Russia in 1917, there in some region, they did something differently. And all this information is compiled
19:02
and released from time to time. The current version comes from the last week. It is TISI data 2019 B. This B means, this is the second version of 2019. This year it is really very quiet but usually there are up to 11 releases
19:20
per year. And this file, if you download it, 300 kilobytes, if you unpack it, you will find some Perl, Org shell scripts, some documentation. But the most interesting are these files called Africa, Antarctica, Asia, South, North America, Europe, and so on. These files, this is like a book,
19:42
like a book of history of the mankind in the past 130 years. It's really interesting read. There are two things in each file. There is some code that will be interpreted by all the parsers and converted, for example, to PYTZ to time zone libraries for all different programming languages,
20:02
for database systems, for your system, for everything. And there are the comments that explain which line means. And we are going to have a look at that. If there is one picture you want to take from this talk, this is the one. If you want to read it correctly,
20:22
turn your heads to the left. So x-axis are the years from 1890 to 2038. And on the y-axis, if you just look like this, the zero is Greenwich. And everything to the down is West, so America.
20:42
Zero is Europe, Africa. And then there is Asia and Australia. And every line is one of these 440 time zones. And all that changes through more than one century. At the beginning, what you see is really wild. This is the local time of each respective time zone.
21:03
This is, for example, at 33 minutes above zero, we'll find Zurich. This is this 34, oh, 34, yes, 34 minutes. This is the 34 that we have seen at the beginning. If you instantiate a time zone object for Zurich, the beginning, these 34 minutes, it means that Zurich at the beginning
21:21
was defined as 34 minutes ahead of UTC. Then you see that it is like more normalized to more or less 24, some 24 different time zones. There are some half hour time zones, some quarter hour time zone. And then what you see,
21:40
this is daylight saving time every year. Then it stops. Then maybe you don't see that some lines just jump by one or two time zones to one or other direction. And then what you see sometimes, there are vertical lines through the whole spectrum. And the vertical lines are some random Pacific Ocean islands that just jumped the whole day and moved from the eastern hemisphere to western
22:02
or vice versa. 2019, the blue line, this is now. And now what you see, this daylight saving time, it goes on until future. This is how it is defined. It means if you say, I wrote a Python application, I tested it, I put it in virtual of Docker
22:21
and it can run independently, this is what it will do the whole time. 2021, European Union wants to abolish daylight saving time switching. Your code will just jump. So don't forget to update your libraries. This is more specifically Europe.
22:42
You see that every time zone is positioned in the largest city. So we have, for example, Zurich for Switzerland. In Switzerland you see L.I. and D.E., I will explain it later. Yeah, so this is how it looks in Europe and this is how the time zones look more specifically in Europe, only the European time zones.
23:02
And 1919, you see there are quite wild jumps somewhere in Russia. And between 1919 and 1940, you see a blue line around the minus one, no, plus one, that is a little bit offset, but very regularly, that's Netherlands. So, but let's return back to Switzerland.
23:22
We are going to have a look at Europe-Zurich time zone. So this is what you find as a code, Europe-Zurich, and then you have the offset. The dashes or Swiss or EU are the rules, I'm going to explain that. Then the short name of the time zone. You see LMT, LMT is local mean time. So LMT, every time zone had once LMT.
23:42
Then there is BMT, this is Bern mean time, and CE is Central European summer time or not. And then the last column is until when it was valid. So it means Zurich as a time zone until 1853 was 34 minutes and eight seconds ahead of UTC. And then they switched to Bern mean time.
24:03
So it was still called Europe-Zurich, there is no Europe burn, but the mean time in Bern is five minutes less. So this was still not the whole Switzerland because Geneve stayed with their own time until 1994, and only then they followed the Swiss time zone rule.
24:22
So important is this time zone before 1970 is valid only for Zurich, because Bern had their own local time, Geneve, Fribourg, Lausanne, and so on. Every city had their own mean time. So if you want to calculate something for any city before 1970,
24:40
you can calculate it only for Zurich. So, and there is this Swiss. What does Swiss mean? It is defined somewhere else. That during the World War II, Switzerland experimented a little bit with daylight saving time. Only once they just abolished it. And this EU rule, this is something
25:00
that most European time zones are using. And you see there was some different time zone in 77, 80, and so on. But Switzerland started following it only in 81. But European time zone rule started in 1977. It means that there were already countries that followed the European rules.
25:21
Switzerland joined a little bit later. And that was KAOS. We are going to have a look at that. But the most important lines, if you are working with European time zones, are the last two lines, because this is actually what we are using now. The last two lines, you see that from 1981, on the last Sunday of March, we start daylight saving time,
25:41
and it goes until the end of October. And these two max words mean that it is defined indefinitely. So in the future, always it will just jump between daylight saving time and standard time. Who remembers that the daylight saving time didn't run until end of October the whole time? Because until 1995, it was until the end of September.
26:02
So our generation should remember that. And if there is some changement, they will just add some new lines to this file. So there is Vaduz, Lichtenstein, there is Link. So you can use your Vaduz, Europe, Zurich. They are the same. This is just a simple link.
26:22
And there is this Büzingen. Ever been to Büzingen? This is Germany, almost. There are two time zones in Germany. Both of them start with B. One is Berlin, the other one is not Bonn. It's Büzingen. If you, this is not far away from here.
26:40
If you see the border between Germany and Switzerland, this is the Rhine River. But river is like this and the border is not exactly the river because there are some villages on one side or the other side. And there is one bigger city called Schaffhausen. There are very famous waterfalls on the Rhine River. And this is like a region on the north of Rhine.
27:02
It's part of Switzerland. And next to Schaffhausen, there is a small village, Büzingen, 1,500 inhabitants. They have two postal codes, like the Swiss and the German one. You can call them using 49 or 41 phone call, like through Germany or Switzerland.
27:21
And they have their own time zone. Why is that? Because these are the 70s and 80s in Europe. This is how the daylight, semi-time was introduced. You see the year 70, it starts in 73, goes to 85. And you see the numbers zero to 30 to 29.
27:44
These are all the time zones, all the European, all the capitals of the European Union countries. Some of them are plus, minus one or plus one. And the graph shows the offset in hours
28:02
in how many countries there is currently the offset. So usually now you would see something like in winter and in summer and winter and in summer. But when you see some irregularities, it means that there were countries that started with their daylight saving time a little bit sooner, a little bit later. So at the beginning there were only five, six countries
28:21
and later there were more, more, more. Now all of them are following daylight saving time. And if you see small jumps, it means that some countries started with a daylight saving time a week later, a week sooner, two hours later, and so on. At the end of the 70s it was real cows in Europe. And Germany started with a daylight saving time, I think in 1980.
28:42
And Switzerland didn't, only one year later. And Busingen, oh, we forgot to switch with Germany. Okay, we are going to stay with Switzerland and that's why Busingen links to Zurich. So let's have a look at a few neighboring countries. Berlin at the beginning it was 53 minutes,
29:01
28 seconds ahead of UTC. Then there was during, at the beginning of the 20th century it was like Central European time zone more or less. And then at the end of World War II there was Soviet zone. During some time Berlin followed Moscow time. So they were three hours ahead of UTC. And then there was Germany rule
29:21
and now European rule from 1980. Paris, France, again there was local time, Paris mean time and during World War II there were the CEU, Central European time
29:40
together with Germany, of course. And since 1977 they started with daylight saving time. And this is Amsterdam. In the comment there is written that Amsterdam mean time was actually 19 minutes, 32 seconds and 32 comma 13 seconds. So really time that you cannot really calculate very easily the offset.
30:04
But then they joined, through Germany they joined Central European time. This is, ah, okay. Now you hear something like summertime or daylight saving time and standard time. In some languages there is a concept of summertime and wintertime.
30:20
Summertime, wintertime, wintertime, wintertime. The problem is that there is no wintertime. There is only one exception in the history of the world. There was in one country once wintertime and this was Czechoslovakia in 1946. The parliament did a law that the government may declare wintertime.
30:42
Then they did it on the 27th of November, 46. Then it will start on the 1st of December. And on the 1st of December Czechoslovakia will go in the standard time even one hour back. So this was not daylight saving time, it was daylight wasting time. It worked until the 23rd of February,
31:02
then abolished and never introduced again. But this law is always valid and Czech Republic and Slovakia in 93 followed over. They took all the laws from Czechoslovakia. It means that now, it is even in the book of laws I have checked, it means that the Czech government or the Slovak government may declare wintertime at any time.
31:21
So when you travel to Prague or Bratislava just pay attention whether they are not on the wintertime again. So this was Europe, quite predictable now, hopefully. But let's have a look at some other time zones. So for example, there is Istanbul, which is Europe, Istanbul or Asia, Istanbul because it is on both continents.
31:41
And then you see some information, you have already seen this. But you see there 2011, 14, 15, sometimes EU rule and sometimes something different. What does that mean? There are comments. Turkey will change into summertime on March 28th instead of March 27th. This change is due to a nationwide exam.
32:01
It means on the 10th of March, less than three weeks ahead, they decided we are not going to start daylight saving time on Sunday, we are going to start it on Monday. You can now imagine how fast you can update your systems. They didn't learn nothing, 2014 again. DST for Turkey has been changed for this year
32:20
because of the Turkish local election. So Turkey will move clocks forward one hour, one day later, again mid-February. That's not early enough. The second comment is from Randall Schwartz. Having landed on a flight from the States to Istanbul, I can tell you that nobody respected this time zone change delay, maybe the world just didn't get out in time. Imagine airports, they have their embedded systems,
32:41
they are not going to update that fast. 2015 is officially announced that it delays wintertime to the 8th of November, so they are going to start it one week later. BBC News, da da da, EST, Erdogan Engineered Standard Time.
33:01
If you have automatic systems, it doesn't work. 2016, there is little code, but a lot of comments. They want to stay in daylight saving time even when winter it is permanent, no they are going to go back. So actually at some point the versions included some information that something will change, but then the government decided
33:21
no they are not going to change it, so the comments they are left in the database but the code just changed. Caracas, Venezuela, clocks advance 30 minutes on the 1st of May, announced two weeks ahead. There is some URL from Reuters and then very important, published in the official gazette and the link to a Venezuelan URL.
33:42
You click on it, there is some PDF file from the government that says that they will update it. The work, the job of people who do something in this mailing list is checking for all these sources and then try to get the best information they can get and then publish it here. Because sometimes you even don't know because there is no official gazette from the government,
34:01
you just read it in some local newspapers. Port-au-Prince, this is Haiti. In summer they have 13 hours of daylight in winter 11 and still since 10 years they vote in February, March, are we going to start daylight saving time or not? Always with 30% probability. The last sentence, we have received four mails
34:21
from different people telling that Haiti has started DST again today and this source seems to confirm that. I have not been able to find a more authoritative source. So if there are enough people who just say, okay, I have seen that, that, that, maybe people in the IANA database maintaining group are going to say, okay, we have to take the information.
34:43
Seoul and Pyongyang, South and North Korea, until 45 it was of course the same and then South Korea experimented with, oh, we are going to move from plus nine to plus 8.30 in 54. So the whole country moved half an hour back
35:01
but all international authorities, like everything that has with Neville, aeronautics, meteorology, telecommunications, they just were afraid that they would have problems communicating with the exterior so they stayed with plus nine hours.
35:20
So it means South Korea was internally, was half an hour behind the external services. North Korea, they started experimenting quite late, 2015. According to many new sources, North Korea is going to change to the 8.30 time zone on August the 15th, announced one week ahead but the most important of course,
35:41
bells rang out midnight as part of the celebrations. 2018, they moved back. North Korea will revert its time zone again back to Korea standard time, announced on the 29th of April while the change was on the 5th of May. So only six days ahead, seven days ahead.
36:02
And then the last thing, it appears to be the front page story at the top in the rightmost column. You click, you get a PDF with 10 columns with some Korean text and then you can find the information that the government is going to switch to a different time zone. So you know, everyone does like this, please. So this is where you can get the information.
36:22
I invite you normally to read more. You will find certainly something that I've missed and then please give a lightning talk tonight or tomorrow that you have found something about your time zone. And the question is what will happen after 2021 because European Union is going to stop switching,
36:40
probably is going to stop switching between daylight saving time and standard time but it is not sure whether they will stay with Central European time or switch to, they call it summertime, but actually Eastern European time. So what will happen? Some big country maybe will decide, okay, we are going to stick with that time zone
37:01
and all the surrounding countries. We don't want to have a border with you with different time zones. We are going to go with you. But that's wrong because nowadays there are European Union internal borders that have time zone differences like between Portugal and Spain, between Poland and Lithuania or between Hungary and Romania.
37:21
But what will happen? Zurich will probably keep the EU rule and only in the last two lines, this max will be replaced by 2021 or a combination of that. Okay, so what you can do to avoid or avoid? Not to get mad about all these time zones.
37:41
Don't invent your time zones, never. Don't hard call any rules. If you check, is it the last Sunday of March between two and three o'clock so I have to do something? No. Keep your time zones lips up to date. It means if you want, what you can even do is to somewhere to store the information that these local time zones
38:02
are from the TC data version 2019b because in the next edition they may change. For example, 2019b edition introduces the abolishment of daylight saving time in Brazil. So for example, this year Brazil in our winter is not going to start daylight saving time.
38:23
And if you now have a Linux system, it is still not in TC data so we have to update it accordingly later when it comes. Follow your government's intentions to modify your time zone and inform visit IANA org, please.
38:40
If you write a nice comment, it will just stay in the archives and a future me or someone else is going to show your comments in a talk. And if you can, avoid the time zones. Thank you very much.
39:01
Thank you, Miroslav. Talking about time, we've got five minutes left for questions. Come to the microphones or get mine. Hello. Can I give you one new example for your slides?
39:24
When Europe moves away from summertime and around that time it's very possible that the UK will have left the EU. Ireland at the moment shares a time zone with the UK
39:40
and will probably work with Europe in the same time zone and get rid of daylight savings. That would mean that in the south of Ireland the time zone will be one hour different from the north of Ireland. So moving south to north, you can go back in time. Just a little example.
40:05
Fair enough, thanks. Other questions? Yes, please. So early on in your presentation you mentioned the example of localizing a time in the wrong way and then getting an offset of 34 minutes and you showed that the 34 minutes
40:20
was actually an old time zone. Can you tell us why does it do that? Like why does it pick the first time zone? Yeah, there's some internal implementation. I didn't study that. But I imagine that actually this PYT is a time zone. Object can, you can differentiate it between passive and active object.
40:43
Passive would be okay, I am here, use my attributes. And active is I have to take your data and do something with it. Because actually PYT has to calculate what was the real time zone offset at that time in the history. Time zone localizer also decides whether
41:03
it is, whether the daytime object is ambiguous or not. Because imagine that you give it the daytime object that is time zone naive from the end of October to 13 in the morning where it is not clear whether
41:21
it is the daylight saving time or not. So actually it has to decide so you have to pass your data to this object. I have heard that some people are unhappy with the implementation how Python does. It could be better. You recommend it.
41:43
I started using data tools instead of PYT set because that follows your operating system so you don't have to rebuild your code. Is there a reason you shouldn't use it? Okay, as I told you, PYT set is more or less the standard but dateutil is perfect as well
42:01
because both of them are based on TC data. And this depends on the operating system you are using. So for example in different Linux distributions PYT set is depending on TC data or not. So for example, Debian Ubuntu depends on TC data
42:21
so if you update TC data all libraries, everything on your system will get the right, the correct, the unique information. But in Arch Linux, PYT set is compiled itself and it doesn't depend on the TC data package. And this happened actually last year in May, June when North Korea switched from 8.30 to nine.
42:45
And on one computer with the current system, Arch Linux computer, I asked for the current time in Pyongyang in Linux and date comment in the command line and in Python and there was offset of half an hour
43:02
because PYT set was still in the old version and TC data was already fresh. So you have to pay attention how it is compiled, not how it is on your system. If they do tell, depends on TC data, it's perfect, but if truly you can compile, they do tell probably that it contains all the information itself. I don't know, it's possible, yeah.
43:21
Sorry. Is PYT set used in the standard Python libraries like date time? So if I do a calculation there going 100 years back, I will not end up from today's midnight at 100 years as ago sometime during the day because there was some weird offsetting.
43:43
PYT set is not in the standard library. It is not in the standard library because it is something that changes quite often several times a year. It is not in the standard library. Because otherwise you could take some current Python, compile it and then run it infinitely, but the TC data information you have to update it
44:03
from time to time, yeah. Okay, so if there are no further questions, we are running out of time. Until tomorrow evening, so. Yeah, just reach out to me and we will be around and give him a big round of applause. Thank you.
44:20
Thank you.