From time to time, I run into a situation where I'd like to know the elapsed time between events. In theory, this is easily accomplished by converting the date/time of both events to seconds since the epoch, then performing several divisions by the appropriate factors.
That is, until you run into this kind of weirdness in which "date" groks "CST", "EDT" and "EST" but throws up its hands at the thought of Central Daylight Time.
[...@madeleine ~]$ date -d "Dec 21 2004 7:42 AM CDT" +%s date: invalid date `Dec 21 2004 7:42 AM CDT' [...@madeleine ~]$ date -d "Dec 21 2004 7:42 AM CST" +%s 1103636520 [...@madeleine ~]$ date -d "Dec 21 2004 8:42 AM EDT" +%s 1103632920 [...@madeleine ~]$ date -d "Dec 21 2004 8:42 AM EST" +%s 1103636520 [...@madeleine ~]$ This is on a CentOS 5.4 machine, fully updated. [...@madeleine ~]$ rpm -q coreutils coreutils-5.97-23.el5_4.1.i386 My apologies if this has already been fixed upstream.