rlm_date and utc time
Matthew Newton
mcn4 at leicester.ac.uk
Wed Mar 29 11:32:15 CEST 2017
On Wed, Mar 29, 2017 at 10:12:25PM +1300, Peter Lambrechtsen wrote:
> encode:
> - if (localtime_r(&date, &tminfo) == NULL) {
> - REDEBUG("Failed converting time string to
> localtime");
> - goto error;
> + if (inst->utc) {
> + if (gmtime_r(&date, &tminfo) == NULL) {
> + REDEBUG("Failed converting time string to
> localtime");
typo: localtime -> UTC
> + goto error;
> + }
> + } else {
> + if (localtime_r(&date, &tminfo) == NULL) {
> + REDEBUG("Failed converting time string to
> localtime");
> + goto error;
> + }
> }
> return strftime(out, outlen, inst->fmt, &tminfo);
...
> Thoughts / comments??
Seems like a good idea to me. UTC/Localtime is always a pain, so
as flexible as possible makes sense.
Matthew
--
Matthew Newton, Ph.D. <mcn4 at leicester.ac.uk>
Systems Specialist, Infrastructure Services,
I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom
For IT help contact helpdesk extn. 2253, <ithelp at le.ac.uk>
More information about the Freeradius-Devel
mailing list