Format date and time for linelog

R3DNano r3dnano at gmail.com
Fri Sep 13 11:56:48 CEST 2019


I have to output the current date and time via linelog on a specific way.
*DD/MM/YYY,HH:MM:SS*

I've figured out all of the fields but the seconds one.
There's no seconds expansion on the documentation:
https://wiki.freeradius.org/config/run_time_variables

I was wondering if there's any alternative way, since I've seen there's a
%S variable that outputs almost what I want: Except, it uses dash instead
of forward slash for date separation and that it outputs both date and time
separated by a space, while I have to use a comma between those two, since
they are going on different fields.

Is there a way to manipulate (substitute) characters? or a better way of
achieving this?

Regards.


More information about the Freeradius-Users mailing list