TIME_SHORT,
TIME_FULL,
TIME_ISO,
+ TIME_ISO_SHORT,
};
/*
case TIME_ISO:
strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%S%z", &tm);
break;
+ case TIME_ISO_SHORT:
+ strftime(buf, sizeof(buf), "%Y-%m-%d", &tm);
+ break;
default:
errx(EXIT_FAILURE, _("unsupported time type"));
}
break;
case COL_PWD_EXPIR:
if (shadow && shadow->sp_expire >= 0)
- user->pwd_expire = make_time(TIME_SHORT,
+ user->pwd_expire = make_time(ctl->time_mode == TIME_ISO ?
+ TIME_ISO_SHORT : ctl->time_mode,
shadow->sp_expire * 86400);
break;
case COL_PWD_CTIME:
* (especially in non-GMT timezones) would only serve
* to confuse */
if (shadow)
- user->pwd_ctime = make_time(TIME_SHORT,
+ user->pwd_ctime = make_time(ctl->time_mode == TIME_ISO ?
+ TIME_ISO_SHORT : ctl->time_mode,
shadow->sp_lstchg * 86400);
break;
case COL_PWD_CTIME_MIN: