-
Notifications
You must be signed in to change notification settings - Fork 86
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
Dates before 1970-01-01 cause crash #10
Comments
Also, see here for info on this bug: https://bugs.python.org/issue29097 |
Not too sure how datetime values are treated. I tried a workaround of converting all dates to Unix timestamps, negative values included, but the results were terrible; converting back to dates gets me a much much smaller range of dates than in the input data. So that's not a solution. Somehow I need dates before 1970 to be treated properly. Any ideas? |
For a workaround solution, if the datetime values are dates, you can first convert them to integers. After generating synthetic dataset, convert integers back to dates.
|
With regards to my previous comment about the distributions of datetime attributes being synthesised poorly: implementing #11 resolves this issue after converting to integers as you suggested in your reply. That is, converting to integers wasn't the source of the behaviour I saw. Replacing |
In DateTimeAttribute.py, line 65:
timestamp()
results in a crash for dates earlier than 1970:This is apparently a known Python bug: see this
Stack Overflow post.
The same problem seems to occur with
timestamp()
; I tried this from a Python command prompt:If you're not seeing this behaviour, the SO post hints that Windows systems are affected, but not Linux.
Is there way to replace the translation from dates to timestamps, and vice versa, with code that works for dates earlier than 1970-01-01?
The text was updated successfully, but these errors were encountered: