Expiration AVP Value Format

classic Classic list List threaded Threaded
3 messages Options
| Threaded
Open this post in threaded view
|

Expiration AVP Value Format

Users mailing list
Hi,

I am using freeradius 3.x with mysql, and want to set expiraton date for some users in radcheck table as

attribute = "Expiration",
op = "==",
value = endDate

What should be the format of the "endDate" string here?

Thanks.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Expiration AVP Value Format

Alan DeKok-2
On Dec 31, 2018, at 2:15 PM, Ali Arslan via Freeradius-Users <[hidden email]> wrote:
> I am using freeradius 3.x with mysql, and want to set expiraton date for some users in radcheck table as
>
> attribute = "Expiration",
> op = "==",
> value = endDate
>
> What should be the format of the "endDate" string here?

  A Unix timestamp as a 32-bit integer also works.  Or, a simple date string:

   "2019 Jan 1 01:01:00"

  The parser is pretty flexible.  It's clear that "Jan" isn't a year or day or hour.  It's clear that "2019" isn't a month of hour/minute.  And it's clear that "01:01:00" isn't a month or a year.

  Alan DeKok.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
| Threaded
Open this post in threaded view
|

Re: Expiration AVP Value Format

Users mailing list


>A Unix timestamp as a 32-bit integer also works.  Or, a simple date string:

>"2019 Jan 1 01:01:00"


Thanks Alan. I will use C# ToDateString() method with "en-US" culture.

 Ali Arslan.


-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html