Archive for the ‘Time’ Category

While looking at the time conversion methods in .NET, I was surprised by this entry in the .NET Date and Time FAQ:

Q: “Does the .NET Framework support time zone conversions to any given time zone?”

A: “People are often surprised why this feature cannot be supplied by Microsoft at low cost. In particular, data to do conversions exists in the Windows registry and is used by the time zone selection dialog. However, there is a big distinction between having UI and registry data and having an API. This is a more expensive feature for Microsoft to undertake than most people would imagine because (a) an API must provide consistent behavior from one machine to another so we cant just re-expose the registry data, and, (b) there is cost for Microsoft in exposing an official time zone conversion because we face ongoing geopolitical costs for any country/region based data we gather and maintain. For example, a country may threaten to boycott our product if it is not listed in the data. This has happened to us with our CultureInfo data on many occasions, and we often need to tweak data in service packs, which is expensive and risky.”

These are the five computer time protocols I recommend providing. For SNTP/NTP, use OpenNTPD (note: if you’re using Solaris 10, check this page for using OpenNTPD Portable with SMF).

SNTP v. 4
RFC 2030
UDP port 123

NTP v. 3
RFC 1305
UDP port 123

Daytime
RFC 867
TCP/UDP port 13

Time
RFC 868
TCP/UDP port 37

TAICLOCK
http://cr.yp.to/proto/taiclock.txt
UDP port 4014

From the OpenBSD at(1) man page: 

[at(1)] accepts times of the form HHMM or HH:MM to run a job at a specific time of day. (If that time is already past, the next day is assumed.)  You may also specify midnight, noon, or teatime (4pm) and you can have a time-of-day suffixed with “AM” or “PM” for running in the morning or the evening.

I just think being able to specify “at teatime ….” is cute.

Book recommendations:

Marking Time: The Epic Quest to Invent the Perfect Calendar is a very good read; add it to your list. Then, if you’re in the mood for deeper reading, try the more scholarly and austere History of the Hour : Clocks and Modern Temporal Orders, which covers the evolution of timekeeping to regulate and limit — among other things — markets, sermons, and torture sessions.