Hi everyone,

Firstly, thanks Alan for your help with my acct_start_time problem, that was exactly what I was after. The only problem that remains for me is getting the value into a different format so I can store it in my database table.

So I have the following setup currently:

share/dictionary.freeradius:

ATTRIBUTE       FreeRADIUS-Acct-Session-Start-Time      2       date


Then in my preacct section:

  update request {
FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
  }


Then I can use %{FreeRADIUS-Acct-Session-Start-Time} which is in the date format:

"Dec  8 2009 09:14:14 GMT".


The database field I will be writing into is a MySQL DateTime field, which is in the format "YYYY-MM-DD HH:ii:ss", eg:

"2009-12-08 11:27:34"


Is there any way for me to get my FreeRADIUS-Acct-Session-Start-Time attribute value into that date format?

Any advice would be very much appreciated.
Many thanks,
Patric
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to