On 10 Dec 2012, at 12:51, Olivier Beytrison <olivier@heliosnet.org> wrote:
On 10.12.2012 12:49, Arran Cudbard-Bell wrote:
Would it work to update the loginTime using in the update section loginTime := "%{integer:event-time}Z"? What's the "timezone" used by the event-time? local machine time?
RFC says:
5.3. Event-Timestamp
Description
This attribute is included in an Accounting-Request packet to record the time that this event occurred on the NAS, in seconds since January 1, 1970 00:00 UTC.
But it'll probably just be the local time on the NAS.
%{integer:Event-Timestamp} should get you it in original unix timestamp form yes.
Yep I also came across the RFC for the event-timestamp. Problem is that the format of the ldap attribute is YYYYMMDDHHMMSS + a trailing "Z". I guess we don't have time-convertion function in unlang ? :p
No we don't, once I have some more free time i'll take a look at doing something. Probably makes sense to do it as a module, time time_xlat { format = "<time format>" } and then "%{time_xlat:TimeAttribute}" And maybe add an Event-Timestamp in preprocess if it's an Access-Request. -Arran