sslutils: expire time in local timezone format (#1188)

waja notifications at github.com
Mon Jul 21 12:07:49 CEST 2014


> @@ -209,10 +210,8 @@ int np_net_ssl_check_cert(int days_till_exp_warn, int
> days_till_exp_crit){
>  
>	time_left = difftime(timegm(&stamp), time(NULL));
>	days_left = time_left / 86400;
> -	snprintf
> -		(timestamp, 17, "%02d/%02d/%04d %02d:%02d",
> -		 stamp.tm_mon + 1,
> -		 stamp.tm_mday, stamp.tm_year + 1900, stamp.tm_hour,
> stamp.tm_min);
> +	tm_t = mktime (&stamp);
> +	strftime(timestamp, 50, "%c", localtime(&tm_t));

seems to be in FreeBSD 1.0:
"www.freebsd.org/cgi/man.cgi?query=strftime&apropos=0&sektion=3&manpath=FreeBSD+1.0-RELEASE&arch=default&format=html"

-- 
Reply to this email on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/pull/1188/files#r15161634
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20140721/d4a0e75d/attachment.html>


More information about the Devel mailing list