Skip to content
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 date '0000-00-00 00:00:00.000000' parse #228

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

seanlook
Copy link

@seanlook seanlook commented Sep 1, 2017

  1. when there's two datetime(6) columns in table, and the first is change to invalid date like '00-00-00 00:00:00.000000',the second parse fail
    I think it's because that the first microsecond part is skipped when it returns None
  2. Sometimes I want to convert datetime '0000-00-00 00:00:00' to exactly the string one rather than None, to keep consistent. add date_tostr argument to BinLogStreamReader to decide the behavior.
    please refer issus datetime '0000-00-00' return string '0000-00-00' #225

zhouxiao added 2 commits August 30, 2017 10:13
to support handling datetime '0000-00-00' as string. affect datetime, datetime2, date. (not timestamp for now)
set 0 to '0000-00-00' rather than '1970-01-01 08:01:00'
@the4thdoctor
Copy link

any estimate of if/when this PR will be merged? It would be nice if I could chose how to handle the datetime.

Thanks

@dongwook-chan
Copy link
Collaborator

dongwook-chan commented Aug 21, 2023

@the4thdoctor
Hi again! I'm terribly sorry that I missed the issue you posted! Me and my open source team will work on this issue.
Do you still think you need this feature? How would you like control over zero datetime?

  1. converter feature as pymysql provides it
  2. optional parameter to BinlogStreamReader

@the4thdoctor
Copy link

the4thdoctor commented Nov 19, 2023

Hi, yes the feature is still very needed.
I think an optional parameter to BinlogStreamReader would be great. It gives me the possibility of making the feature an opt in.
Ta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants