Skip to content

fix date '0000-00-00 00:00:00.000000' parse#228

Open
seanlook wants to merge 2 commits into
julien-duponchelle:masterfrom
seanlook:master
Open

fix date '0000-00-00 00:00:00.000000' parse#228
seanlook wants to merge 2 commits into
julien-duponchelle:masterfrom
seanlook:master

Conversation

@seanlook

@seanlook seanlook commented Sep 1, 2017

Copy link
Copy Markdown
  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
Copy Markdown

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

dongwook-chan commented Aug 21, 2023

Copy link
Copy Markdown
Collaborator

@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

the4thdoctor commented Nov 19, 2023

Copy link
Copy Markdown

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