It's about TIME
David Hoppe @hopasaurus hopasaurus@gmail.com
It's about TIME David Hoppe @hopasaurus hopasaurus@gmail.com It's - - PowerPoint PPT Presentation
It's about TIME David Hoppe @hopasaurus hopasaurus@gmail.com It's time, so what! What is Time? What is a day? What is an hour? What is a minute? What is a second? Lets start at the beginning... What is a Day? How is time measured? By
David Hoppe @hopasaurus hopasaurus@gmail.com
– Sundials and mechanical clocks don't always agree
– As clock get more precise we notice accuracy
slipping
2005 23:57 Willy Leenders 549x375 (49.479 bytes) (grafiek tijdsvereffening, eigen creatie)Modifications 2011:Own work. Licensed under CC BY-SA 3.0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Tijdvereffening-equation_of_time- en.jpg#mediaviewer/File:Tijdvereffening-equation_of_time-en.jpg
– UT0, UT1
INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS) SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE SERVICE DE LA ROTATION TERRESTRE DE L'IERS OBSERVATOIRE DE PARIS 61, Av. de l'Observatoire 75014 PARIS (France)
FAX : 33 (0) 1 40 51 22 91 e-mail : services.iers@obspm.fr http://hpiers.obspm.fr/eop-pc Paris, 5 January 2015 Bulletin C 49 To authorities responsible for the measurement and distribution of time UTC TIME STEP
A positive leap second will be introduced at the end of June 2015. The sequence of dates of the UTC second markers will be: 2015 June 30, 23h 59m 59s 2015 June 30, 23h 59m 60s 2015 July 1, 0h 0m 0s The difference between UTC and the International Atomic Time TAI is: from 2012 July 1, 0h UTC, to 2015 July 1 0h UTC : UTC-TAI = - 35s from 2015 July 1, 0h UTC, until further notice : UTC-TAI = - 36s
Public Domain via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:QSL_card_sent_to_listener_confirming_reception_of_WWV_from_Maryland_- _194007.jpg#mediaviewer/File:QSL_card_sent_to_listener_confirming_reception_of_WWV_from_Maryland_-_194007.jpg
– Will it work until you retire? – When is the “end” of time?
– February 29 and December 31
– February 30, 2015?
http://xkcd.com/1179/
It's about TIME
David Hoppe @hopasaurus hopasaurus@gmail.com
It's time, so what!
A while back I was working on a project involving Receiving GPS signals and forwarding the data to a
is a very accurate representation of the current time. HOWEVER when the signals got to the server the time was reported to be IN THE FUTURE!
What is Time?
What is a day? What is an hour? What is a minute? What is a second?
In Book 11 of St. Augustine's Confessions, he ruminates on the nature of time, asking, "What then is time? If no one asks me, I know: if I wish to explain it to one that asketh, I know not." A second was:1/86400th of a day The second is the duration of 9 192 631 770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium 133 atom.
Lets start at the beginning... What is a Day?
. Do the siderial time exercise. This will start to give a sense that all is not as it seems.
How is time measured?
By the day Sundials Mechanical Clocks Electronic Clocks
Things get weird!
– Sundials and mechanical clocks don't always agree
– As clock get more precise we notice accuracy
slipping
We start to notice things Hours are not uniform Days are not always the same length.
The equation of time
http://en.wikipedia.org/wiki/Equation_of_time So people figured out that the sun dial and the mechanical clock wouldn't agree all the time so they cracked open their history books and looked up this “ptolemy” guy who did a lot of math in ancient egypt and figured this all out for them already. This is partially due to the ecentricity of Earth's orbit also partially due to the Obliquity of the elipctic (pretty sure we humans refer to this as the tilt of the axis) The total variation from one extreme to the other ends up being about half an hour.... whatever an hour is. So now we have two time “standards” Solar time and Mechanical time. Or Apparent time and Mean time.
Which one is “right”?
Time “Standards”
– UT0, UT1
Atomic Time (TAI) – International Atomic Timescale based on a “large number” of atomic clocks Universal Time (UT) is counted from 0 hours at midnight with the unit
as uniform as possible dispite variations in Earth's rotation) UT0 and UT1 are related. Coordinated Universal Time (UTC) differs from TAI by an integral number of seconds. UTC is kept within 0.9 seconds of UT through the introduction of leap seconds. So far all leap seconds have been positive. UTC has replaced “GMT” as a standard. Dynamical Time, Geocentric Coordinated Time (TCG), Barycentric Coordinated Time (TCB), Sidereal Time (this one is interesting) Show the graph of “Variablility of Earth's rotation” And these are just the “Scientific” standards.
Leap Second?
INTERNATIONAL EARTH ROTATION AND REFERENCE SYSTEMS SERVICE (IERS) SERVICE INTERNATIONAL DE LA ROTATION TERRESTRE ET DES SYSTEMES DE REFERENCE SERVICE DE LA ROTATION TERRESTRE DE L'IERS OBSERVATOIRE DE PARIS 61, Av. de l'Observatoire 75014 PARIS (France)https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat Yup leap second, it is Bulletin C put out by the IERS... the WHAT? IERS. International Earth Rotation
Why do we need leap seconds?
Because Earth can't make up it's mind how fast we should be spinning.... I think this comes back to IEARS they must have a rotational speed committee.... probably works kind of like the committee that set the 12.5mph speed limit and the private road my friend lives on. http://tycho.usno.navy.mil/systime.html
How does all this affect me?
Well, lets take a look at that, turns out that is does cause some issues. But look at it this way we get a free second every once in a while to do with what we please.... do you realize that business are losing millions by not billing for that second??? shh lets keep that our little secret.
Ok, we will get back to how it affects us in a little bit but first lets talk about how we sync up our clocks.. This brings us to WWV which is the oldest continuously operating radio station in the United
reports in morse code... by 1922 its purpose was shifted to being the standard by which other stations could measure their signals. Back in that day frequency control was an issue so stations would tune themselves based on WWV being at a known
information by 1960 it was sending a format sutiable for automatic synchronization by machines. http://en.wikipedia.org/wiki/WWV_(radio_station)
NTP and friends
Ok, now we can circle back and tie up some loose
So synchronizing clocks involves dealing with these leap seconds. And in order to work with them and maintain synch we need to be able to have all the clock change as close to the same time as possible. And in the same fashion. Some ideas.... slow seconds... repeat a second.... insert an extra second. Also what time do they synchronize to? UTC https://www.meinberg.de/download/burnicki/Technical %20Aspects%20of%20Leap%20Second %20Propagation%20and%20Evaluation.pdf
Time Bugs
So now that we can see that this is a complex issue, lets have some fun with it. Lets leave all the math and scientificals behind and looks at some past failures related to time.
ZUNE 30
So on December 31st, 2008 Microsoft discovered a bug in their Zune 30 player.... it have been out a couple years by that time so not sure how many were brand new Christmas presents at this point.... but really if you got Zune for Christmas... well its just not an iPod is it. Anyway they ALL locked up... let the finger pointing
provided by one of the chip manufacturers for clock management and there was a serious flaw in the software for years with 366 days, that is to say LEAP years. Lesson learned from this? Don't trust your vendors too much.... also test for leap year on Feb 29 and also December 31st.
Excel Bug
To maintain compatibility with Lotus, Excel introduced “incorrect” behavior it was decided that “fixing” it would potentially break some systems that depended
Excel. Come on Excel if Lotus jumped off a bridge would you? No we got market share. Lesson learned... Sometimes bugs are ok
Y2K
Yeah..... Well it was true, space was at a premium back in the
and space was a big issue and they knew this would be a problem but kicked the can down the road. Lesson learned – pay attention to the tradeoffs you are making and don't kick the can off the edge of the cliff.. you (or someone else) will have to deal with the ramifications of your trade off sooner or later.
Y2.038K
So yeah, when counting seconds from 1970 you run
before this hits though right? Well that is what AOL thought until their webservers crashed in 2006. Someone had hard coded a timeout of ONE BILLION seconds into a config file... guess what? May 12, 2006 is ONE BILLION seconds before January 19, 2038... someone had a rough day. Lesson learned: just because one effect is far off does not mean others are not lurking closer in. Also did anyone learn anything from Y2K? Enough fun with bugs, lets talk more practically http://en.wikipedia.org/wiki/Year_2038_problem
Tips for dealing with date/time:
– Will it work until you retire? – When is the “end” of time?
C++ has boost Java has Joda time C# has stuff built in JavaScript has moment.js and others which is really good cause the different browsers all have really messed up quirks that will drive you nuts. And so on. Writing your own is asking for bugs... but don't over trust,,, remember the Zune. Do some testing. Pay attention to how the time/date is being stored. Don't let the code come back to bite you. A nice wrapper around time access allows for easier testing and also you can change out the implementation in a single place if desired. Unless you like singing “Auld Lang Time”
Testing Time
– February 29 and December 31
– February 30, 2015?
How should a Date be written?
http://xkcd.com/1179/
Fun facts
Watch crystals are cut so that they are most accurate when the watch is warm, that is being worn. Leaving a watch off for a significant amount of time will result in the watch drifting. Probably not a noticeable amount though. There have been several attempts at trying to introduce “Metric Time” in 1790 the French tried it.. In the 1990's Swatch took a go at it with “Swatch Internet Time” The fake keeps good time. BIPM is in charge of time, they are the ones that make the leap seconds happen.
End of Time?
The scientists are at it again... they now have a clock so accurate that it isn't accurate.... see time is relative.. moving from here (floor) to here..(up high) there is a one part in 10^16 change in the rate of the passage of time... some students at the University of Colorado Boulder claim to have built a clock sensitive enough to be affected by these
(America's official timekeeper) would be concerned, but really he is excited about the possibilities for this
but for the ability to measure things that affect time. http://www.npr.org/2014/11/03/361069820/new-clock- may-end-time-as-we-know-it
What time is it now?