X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=aft.c;h=f14440e6fb903548e25ccfdf611f4c2f2881aa49;hp=261054df8fc4012236b42246158b87b77ce1623c;hb=e0e0da08c77df028c261e27f3ab0b6250fbaa3bc;hpb=6aad8ed5fef24cdf2c65cbb193572cb10c2b2c1c diff --git a/aft.c b/aft.c index 261054df..f14440e6 100644 --- a/aft.c +++ b/aft.c @@ -696,7 +696,13 @@ static int get_local_time(uint64_t *seconds, char *buf, size_t size, return -E_STRFTIME; return 1; } - if (!strftime(buf, size, "%b %e %Y", tm)) + /* + * If the given time is more than six month away from the current time, + * we print only the year. The additional space character in the format + * string below makes the formated date align nicely with dates that + * contain the time (those written by the above strftime() statement). + */ + if (!strftime(buf, size, "%b %e %Y", tm)) return -E_STRFTIME; return 1; }