[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: Accounting Start Time in Interim-Update of queries.conf is written differently between MySQL and
From:       Alan DeKok <aland () deployingradius ! com>
Date:       2023-08-18 14:56:38
Message-ID: BE8CD349-2CF9-47E8-B4F4-759743424B5D () deployingradius ! com
[Download RAW message or body]

On Aug 18, 2023, at 5:40 AM, Ibrahim Al Mahfooz <ibrahim.nezar@sevennet.net> wrote:
> The differences are in the accounting start time inside the interim-update
> section:
> - In mysql it is written as:
> FROM_UNIXTIME(${....event_timestamp_epoch} - %{%{Acct-Session-Time}:-0}), \
> 
> - While in postgresql it is:
> ${....event_timestamp}, \

  It's that way in mssql and Oracle, too.  Those need fixing.

> I found that the line in postgresql queries actually causing the start to
> be inaccurate since it will reflect current time while it should reflect
> the elapsed time (current time - accounting session time)
> 
> Having this, I had to change the line to this and it seems to be working:
> TO_TIMESTAMP(${....event_timestamp_epoch} - %{%{Acct-Session-Time}:-0}), \

  I'll push a fix.

> Any reason why it is not written with the same logic of MySQL queries file?

  It was missed I guess.

> Will the change I made impose any risks or issues down the road?

  No.

  Alan DeKok.

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic