-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[defect]: Port time parsing from v4 to v3.2.x #5323
Comments
Hi, any updates on that? |
@rygl We're happy to accept patches. |
Just looking at this now, v3 does call The call to |
I am affraid that not:
The same issue is with 3.2.1. I am not sure if it makes any difference - the the issue is that update req. with: gives ouptut to detail file:
I am ready to provide more details or debugs if it helps. |
From the
I suspect the same is true on other systems. In short, parsing time zones is difficult to impossible. If the time zone being parsed is the local time zone, then it will work. Otherwise, it's essentially an impossible problem to solve. |
I am sorry, what you mean if you say "local time zone here"? My local tz is CEST, req. is coming from CEST... nevertheles I understand the problem with ambiguous TZ abreviations. Is it worth to test freeRadius v4 in my case? I just process accounting req., no auth logic. |
If your local time zone is CEST and the date being given is CEST, then it should work. If it doesn't, I suspect it's a bug in You can test v4, which should have the same behavior, because it also uses In order to address this issue in v4, we have changed the default date printing to RFC 3339 format. That format does not use words for months, and uses only numbers for time zone offsets. As such, that format is unambiguous, and doesn't have any of these problems. |
What type of defect/bug is this?
Unexpected behaviour (obvious or verified by project member)
How can the issue be reproduced?
In v4, src/lib/util/time.c has a function
fr_unix_time_from_str()
. This function mirrors the v3 functionfr_get_time()
.However, v4 has been updated to add a call to
strptime()
, which handles time zones. v3 is missing that.We don't want to port the v4 "parse RFC3339 date" code. But we do want to be able to parse time zones.
Log output from the FreeRADIUS daemon
Config: update request { Event-Timestamp := "May 16 2024 21:32:59 CEST" }
which gives output:
Whoops. :( Time zone is ignored.
The text was updated successfully, but these errors were encountered: