localtime does not consider the leap-seconds, if daylight-saving time is not defined timep's year or later daylight-saving time: $ TZ=right/US/Eastern date -d@1230768023 Wed Dec 31 18:59:60 EST 2008 no daylight-saving time: $ TZ=right/Asia/Tokyo date -d@1230768023 Thu Jan 1 09:00:23 JST 2009 expected => Thu Jan 1 08:59:60 JST 2009
Created attachment 3970 [details] Patch to fix the problem
I applied the patch. The problem wasn't visible, though, because of another bug.