Hi,

> Today I fell over some caveat when it comes to handling AcctStopTime in 
> databases. In mysql, the schema defines
> 
>   acctstarttime datetime NOT NULL default '0000-00-00 00:00:00',
>   acctstoptime datetime NOT NULL default '0000-00-00 00:00:00',

..and we've already has a discussion last week about those values
being 'illegal' according to the MySQL datetime documentation.

The DATETIME type is used when you need values that contain both date and time 
information. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD 
HH:MM:SS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 
23:59:59'.


however, just to run it in, if you enter an illegal entry (eg 123454324352)
then that value gets converted to..... yes, wait for it....
0000-00-00 00:00:00

hurrah!  the docs clearly state this case too.

I would say we get a little historical and set the default date to

1970-01-01 00:00:00


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

Reply via email to