-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fix timestamp issue #27
Conversation
Can they not be Julia date time objects? |
The
I have therefore made a simpler |
@@ -77,3 +79,11 @@ end | |||
function ==(a::MySQLDateTime, b::MySQLDateTime) | |||
a.date == b.date && a.time == b.time | |||
end | |||
|
|||
@require Dates begin | |||
using Dates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dates is not that big a dependency, and it is built into base in 0.4. Is Requires.jl worth it here?
I really don't like the idea of returning a new type. As a user, what am I supposed to do with this new type? I'll have to convert into As for the performance, if you are converting a fixed format, you can use a predefined |
@aviks I added Requires.jl because I am supporting v0.3. I can get rid of Is there a julia time type? Right now I have a custom type |
I think the performance issue should be isolated and upstreamed. @aviks What do you suggest we do for just time? |
For Time type, get this merged: JuliaLang/julia#12274 In the meanwhile, just use DateTime types for types as a workaround. That is what I do at the moment. |
I am discarding this PR since the issue is fixed in #28 |
This is a fix for #26
MySQL timestamps were being interpreted as
Int32
's, but were received as date time strings. Changed datatype fromInt32
toMySQLDateTime
.