Re: Expiration Value

2008-02-26 Thread Marinko Tarlac

Well here is how I did it.

I have one table (users) and inside that table I have a field for 
expiration in -MM-DD format. When I check option to control this 
date, I transfer this date in radcheck table but before that I convert 
it in format we spoke about.


Here is query how to do it.

SELECT DATE_FORMAT( `ex_date` , '%M %d %Y %H:%i:%s' ) AS ex_date FROM 
users WHERE user='some_user';


Tim White wrote:
The format isn't easily sortable or useable in a SQL compare 
operation. It also requires slightly more work to generate. The simple 
format of "-MM-DD HH:MM:SS" makes more sense to me. It is easily 
human readable, and is also easily machine readable, isn't locale or 
language dependent.


Basically, it means that to do any operations on the table regarding 
the Expiration date, where I only want dates between a range, I have 
to get all dates, and sort them outside of SQL.


I'm not sure if print.c is the right place for this, but I've not had 
a chance to look at the code.


Tim

Marinko Tarlac wrote:

Well what problem do you have with this format?

Best regards

On Tue, Feb 26, 2008 at 10:21 AM, <[EMAIL PROTECTED] 
> wrote:


Hi,
> Tim White wrote:
> > Bummer. Does anyone know how to get a format that doesn't use
Words
> > (month Name)?
>
>   Edit src/lib/print.c to print dates in a different format.
 Or, make a
> suggestion for the format you like...

hmm, a feature request?   what variable in the config though?
print_time ?

print_time = human
print_time = UTC
print_time = unix ?

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




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


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




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


Re: Expiration Value

2008-02-26 Thread Tim White
The format isn't easily sortable or useable in a SQL compare operation. 
It also requires slightly more work to generate. The simple format of 
"-MM-DD HH:MM:SS" makes more sense to me. It is easily human 
readable, and is also easily machine readable, isn't locale or language 
dependent.


Basically, it means that to do any operations on the table regarding the 
Expiration date, where I only want dates between a range, I have to get 
all dates, and sort them outside of SQL.


I'm not sure if print.c is the right place for this, but I've not had a 
chance to look at the code.


Tim

Marinko Tarlac wrote:

Well what problem do you have with this format?

Best regards

On Tue, Feb 26, 2008 at 10:21 AM, <[EMAIL PROTECTED] 
> wrote:


Hi,
> Tim White wrote:
> > Bummer. Does anyone know how to get a format that doesn't use
Words
> > (month Name)?
>
>   Edit src/lib/print.c to print dates in a different format.
 Or, make a
> suggestion for the format you like...

hmm, a feature request?   what variable in the config though?
print_time ?

print_time = human
print_time = UTC
print_time = unix ?

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




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


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


Re: Expiration Value

2008-02-26 Thread Marinko Tarlac
Well what problem do you have with this format?

Best regards

On Tue, Feb 26, 2008 at 10:21 AM, <[EMAIL PROTECTED]> wrote:

> Hi,
> > Tim White wrote:
> > > Bummer. Does anyone know how to get a format that doesn't use Words
> > > (month Name)?
> >
> >   Edit src/lib/print.c to print dates in a different format.  Or, make a
> > suggestion for the format you like...
>
> hmm, a feature request?   what variable in the config though?
> print_time ?
>
> print_time = human
> print_time = UTC
> print_time = unix ?
>
> alan
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html
>
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Re: Expiration Value

2008-02-26 Thread A . L . M . Buxey
Hi,
> Tim White wrote:
> > Bummer. Does anyone know how to get a format that doesn't use Words
> > (month Name)?
> 
>   Edit src/lib/print.c to print dates in a different format.  Or, make a
> suggestion for the format you like...

hmm, a feature request?   what variable in the config though? 
print_time ?

print_time = human
print_time = UTC
print_time = unix ?

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


Re: Expiration Value

2008-02-26 Thread Alan DeKok
Tim White wrote:
> Bummer. Does anyone know how to get a format that doesn't use Words
> (month Name)?

  Edit src/lib/print.c to print dates in a different format.  Or, make a
suggestion for the format you like...

  Alan DeKok.

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


Re: Expiration Value

2008-02-25 Thread Marinko Tarlac

I tried with classic format -MM-DD but it doesn't work.

Tim White wrote:

Ivan Kalik wrote:

The one you have there in the text.
  


Bummer. Does anyone know how to get a format that doesn't use Words 
(month Name)?


Thanks

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




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


Re: Expiration Value

2008-02-25 Thread Tim White

Ivan Kalik wrote:

The one you have there in the text.
  


Bummer. Does anyone know how to get a format that doesn't use Words 
(month Name)?


Thanks

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


Re: Expiration Value

2008-02-25 Thread Ivan Kalik
The one you have there in the text.

Ivan Kalik
Kalik Informatika ISP


Dana 25/2/2008, "Tim White" <[EMAIL PROTECTED]> piše:

>So you maintain to instances of this value?
>Once in radcheck, and once in an external table? The first instance, in 
>radcheck, what format do you have that in?
>
>
>Thanks
>
>Tim
>
>Ivan Kalik wrote:
>> We don't do these checks on radius database at all. We have a billing
>> database with users details which has value of this attribute in
>> datetime format and checks are done there.
>>
>> Ivan Kalik
>> Kalik Informatika ISP
>>
>>
>> Dana 25/2/2008, "Tim White" <[EMAIL PROTECTED]> piše:
>>
>>   
>>> I'm attempting to use Expiration to expire user accounts after a set
>>> time period. What format does the Date/Time (Value field) have to be?
>>> From what I can see it's in the format of "Monthname Day Year
>>> Hour:Min:Sec". So for example "March 24 2008 00:00:00". But it appears
>>> that in this format you can't use normal SQL datetime operators to see
>>> if it's expired (for example, to run a SQL query to remove all expired
>>> accounts).
>>>
>>> Can someone who has it working please let me know what format they use
>>> for Expiration value, and how they can use MySQL comparison operators
>>> with it?
>>>
>>> (Ether 2.0.2 or 1.1.7).
>>>
>>> Thanks
>>>
>>> Tim
>>>
>>> -
>>> List info/subscribe/unsubscribe? See 
>>> http://www.freeradius.org/list/usershtml
>>>
>>>
>>> 
>>
>> -
>> List info/subscribe/unsubscribe? See 
>> http://www.freeradius.org/list/users.html
>>   
>
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>

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


Re: Expiration Value

2008-02-25 Thread Tim White

So you maintain to instances of this value?
Once in radcheck, and once in an external table? The first instance, in 
radcheck, what format do you have that in?



Thanks

Tim

Ivan Kalik wrote:

We don't do these checks on radius database at all. We have a billing
database with users details which has value of this attribute in
datetime format and checks are done there.

Ivan Kalik
Kalik Informatika ISP


Dana 25/2/2008, "Tim White" <[EMAIL PROTECTED]> piše:

  

I'm attempting to use Expiration to expire user accounts after a set
time period. What format does the Date/Time (Value field) have to be?
From what I can see it's in the format of "Monthname Day Year
Hour:Min:Sec". So for example "March 24 2008 00:00:00". But it appears
that in this format you can't use normal SQL datetime operators to see
if it's expired (for example, to run a SQL query to remove all expired
accounts).

Can someone who has it working please let me know what format they use
for Expiration value, and how they can use MySQL comparison operators
with it?

(Ether 2.0.2 or 1.1.7).

Thanks

Tim

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





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


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


Re: Expiration Value

2008-02-25 Thread Ivan Kalik
We don't do these checks on radius database at all. We have a billing
database with users details which has value of this attribute in
datetime format and checks are done there.

Ivan Kalik
Kalik Informatika ISP


Dana 25/2/2008, "Tim White" <[EMAIL PROTECTED]> piše:

>I'm attempting to use Expiration to expire user accounts after a set
>time period. What format does the Date/Time (Value field) have to be?
> From what I can see it's in the format of "Monthname Day Year
>Hour:Min:Sec". So for example "March 24 2008 00:00:00". But it appears
>that in this format you can't use normal SQL datetime operators to see
>if it's expired (for example, to run a SQL query to remove all expired
>accounts).
>
>Can someone who has it working please let me know what format they use
>for Expiration value, and how they can use MySQL comparison operators
>with it?
>
>(Ether 2.0.2 or 1.1.7).
>
>Thanks
>
>Tim
>
>-
>List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
>
>

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


Expiration Value

2008-02-25 Thread Tim White
I'm attempting to use Expiration to expire user accounts after a set 
time period. What format does the Date/Time (Value field) have to be?
From what I can see it's in the format of "Monthname Day Year 
Hour:Min:Sec". So for example "March 24 2008 00:00:00". But it appears 
that in this format you can't use normal SQL datetime operators to see 
if it's expired (for example, to run a SQL query to remove all expired 
accounts).


Can someone who has it working please let me know what format they use 
for Expiration value, and how they can use MySQL comparison operators 
with it?


(Ether 2.0.2 or 1.1.7).

Thanks

Tim

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