I am developing an application using Django.
In one of the models, I have a field models.DateTimeField('date_of_birth')
.
I was trying to add few records from the django admin site. Few records were added without any problems. But, the record with a date of birth 1956-01-01 is causing 'Overflow error
' with the exception value 'mktime argument out of range
'.
Some Googling suggested that the mktime error comes when the date is earlier than the epoch(see here).
The work around suggested there was to use datetime to find the difference from the epoch and save it instead.
Is this not a bug? Is there any workaround instead of converting into the difference?
For the court records, I am using python 2.7, django 1.4.1 and MySQL 5.5 on Windows 7 x64.