5 Jun 2008 04:30
Something is wrong with date and timezones
Hi, There's something wrong with the date function. It looks like the timezone codes are defined incorrectly. The following command should be the identity function. This is the result on an XP SP 2 date -d "1970-01-01 1212522780 sec UTC" +"%s" 1212526380 It is the identity function if the timezone is EST. The actual timezone is EDT. date -d "1970-01-01 1212631585 sec EST" +"%s" 1212653185 Even if --utc is specified, the value is not preserved date --utc -d "1970-01-01 1212631585 sec UTC" +"%s" 1212635185 Date works OK on a linux system running GNU. --Brad ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php
RSS Feed