Having a consistent Event-Timestamp format

Herwin Weststrate herwin at quarantainenet.nl
Thu Oct 13 12:49:07 CEST 2016


On 13-10-16 12:37, Anuruddha Premalal wrote:
> Hi All,
> 
> I'm using the 'Event-Timestamp' in the python module it's printed as
> follows.
> 
> *Oct 12 2016 13:59:27 UTC*
> 
> However the timestamp format present in the MySQL databse is *2006-01-02
> 15:04:00*
> 
> Is it possible to enforce the same format as MySQL across the board?, I
> wasn't able to locate related documentation on this.

Normalizing to MySQL sounds pretty unusual, I'd normalize it to ISO8601.

But I think the Python-module has a different problem here: the
Event-Timestamp attribute is marked in the dictionary as type date.
Python has a datetime class. Wouldn't it be better to pass a datetime
object to the Python script instead of a stringified version of the date?

-- 
Herwin Weststrate


More information about the Freeradius-Users mailing list