1. Times map

    timemap.png

    http://www.worldtimezone.com/datetime.htm



  2. links for 2008-03-16



  3. links for 2008-03-11



  4. Time (mis-)conception and discoveries

    Recently I have been asked to create a non obstrusive interface for a kind of GTD – a 5 items list time elapsed representation.

    tasp-15112007.jpg
    (I am still on it – it should be coming soon…)

    I decided to use this a sa pretext to teach myself a bit of Java and to pull the gears on Processing – much more suitable for people like me to learn and develop things.
    This was also the occasion for a brilliant personnal discovery:

    The Time

    As I was programming a bit of server side things, I knew aleady a bit about Unix timestamp, and how it is used, and why we need such time representation. What I did not know is that Unix Timestamp is not the only one out there:

    * January 1, 1 – Symbian epoch (using microseconds) and Microsoft .NET’s DateTime epoch. Also used as base date in REXX counting days. This epoch is known as Rata die.
    * January 1, 1601 – Windows’ Win32 file time-stamp epoch (using 100-nanosecond ticks). COBOL date/time function epoch.
    * November 17, 1858 – VMS epoch and the base date of the Modified Julian Day used in celestial ephemerides by the United States Naval Observatory and other astronomy organizations.
    * December 31, 1899 – Microsoft Excel epoch, using the Julian calendar leap year rule for 1900 (hence with leap day February 29, 1900) and the Gregorian calendar for the years 1901 – 9999 ; thus for dates from 1 March 1900 a time is stored as the number of days in the Gregorian calendar from December 30, 1899, 00:00; optionally Microsoft Excel can also use the Apple Macintosh epoch, which avoids the complication by starting later; its count of days is 1462 less.
    * January 1, 1900 – Network Time Protocol epoch. IBM CICS epoch. Microsoft Excel (and Lotus 1-2-3) technically consider the epoch of December 31, 1899 as January 0, 1900 or a serial date of zero (consequently, December 31, 1899 cannot be used). January 0, 1900 can be processed and formatted in Excel Worksheets, just as any other date.
    * January 1, 1904 (local time) – Apple Macintosh epoch, through Mac OS 9. Palm OS epoch. According to Martin Minow,[4]

    January 1, 1904, was chosen as the base for the Macintosh clock because it was the first leap year of the twentieth century. [...] This means that by starting with 1904, Macintosh system programmers could save a half dozen instructions in their leap-year checking code.

    * January 1, 1960 – S-Plus
    * January 1, 1970 – Unix epoch, Mac OS X, Java.
    * January 1, 1978 – AmigaOS epoch [1]
    * January 1, 1980 – MS DOS, OS/2, and other environments supporting a FAT file system encoding dates from 1980 up to 2107 in 16 bits.
    * January 6, 1980 – Qualcomm BREW and the GPS epoch.[5]

    (Retrieved from Epoch#Computing on Wikipedia)

    Each of those epoch represent or more exactly are the result of a decision process which is argued, logical and aimed at solving specific issues (apart maybe the FAT16, but that might be purely a personnal hate since the morning I lost all my work for my Bachelor – it’s also why I switched to Apple, so maybe I should be a bit more grateful to FAT-whatever-its-number).

    While I was googling on the topic in the search of date/time conversion for processing/java, I came across a very nice ressource I enjoyed reading:
    Date and time in Java – http://www.odi.ch/prog/design/datetime.php which I am quoting below:

    UNIX time stamps are the number of seconds that have elapsed since midnight 1.1.1970 UTC. Uh… here appears a “date”. Never mind, we’ll get to that in a minute. Java’s java.util.Date class effectively encapsulates a UNIX time stamp. It represents a point in time by a millisecond counter in a 64 bit long variable. While 32 bit representation on UNIX will overflow in 2038 the 64 bit signed long will last for roughly another 18 billion years. Please note that the all the deprecated methods and constructors of the Date class should never be used. They are from a time when the Sun people were confused about time themselves. javax.management.timer.Timer has some convenient constants for the most used millisecond values.

    As Unix Timestamp is a 32 bits based time encoding – its overflow limit (the kind of y2k bug) is in 2038. You can spread the word and advertise this fact by wearing this:
    tshirt.jpg

    There’s not that many useful info about date and time on processing.org website (I might be wrong however – I am certainly, please correct or update in the comment), so I thought I would share a bit of my diggings and notes:

    Basics of time in Processing:
    int NOW = year()+month()+day()+hour()+minute()+second();

    Here are a few class you might like to check – they contain essential things when you want to talk Time with Processing
    import java.util.Date;
    import java.util.Calendar;

    it’s usefull to have this in hand:
    int ONE_HOUR = 3600000;
    int ONE_MINUTE = 60000;
    int ONE_SECOND = 1000;

    This let’s you write “in 8 hours”:
    Date in8Hours = new Date(now.getTime() + 8L * ONE_HOUR);