Skip to content

[defect]: Port time parsing from v4 to v3.2.x #5323

Open
@alandekok

Description

@alandekok

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 function fr_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:

(0)       update request {
(0)         Event-Timestamp := "May 16 2024 21:32:59 EDT"

Whoops. :( Time zone is ignored.



### Relevant log output from client utilities

_No response_

### Backtrace from LLDB or GDB

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectcategory: a defect or misbehaviourv3.2.xmeta: relates to the v3.2.x branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions