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

Bug fix '#18402 parseDateTimeBestEffort should not ignore AM abbreviation for 12th hour' #18449

Conversation

vladimir-golovchenko
Copy link
Contributor

@vladimir-golovchenko vladimir-golovchenko commented Dec 24, 2020

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category:

  • Bug Fix

Changelog entry:
Proper support for 12AM in parseDateTimeBestEffort function. This fixes #18402.


Detailed description:

parseDateTimeBestEffort * functions ignore AM abbreviation leads to wrong processing the 12th hour.

Bug reproducing

SELECT
    parseDateTimeBestEffort('2020-02-01 12:10:00 AM') AS am,
    parseDateTimeBestEffort('2020-02-01 12:10:00 PM') AS pm

┌──────────────────am─┬──────────────────pm─┐
│ 2020-02-01 12:10:002020-02-01 12:10:00 │
└─────────────────────┴─────────────────────┘

Expected behavior

┌──────────────────am─┬──────────────────pm─┐
│ 2020-02-01 00:10:002020-02-01 12:10:00 │
└─────────────────────┴─────────────────────┘

See related bug #18402.

@robot-clickhouse robot-clickhouse added the pr-bugfix Pull request with bugfix, not backported by default label Dec 24, 2020
@vladimir-golovchenko
Copy link
Contributor Author

Related bug: #18402

@alexey-milovidov alexey-milovidov self-assigned this Dec 24, 2020
@alexey-milovidov
Copy link
Member

I have added the changelog entry.

@alexey-milovidov alexey-milovidov merged commit 230f9b6 into ClickHouse:master Dec 25, 2020
robot-clickhouse pushed a commit that referenced this pull request Dec 25, 2020
…uld not ignore AM abbreviation for 12th hour'
robot-clickhouse pushed a commit that referenced this pull request Dec 25, 2020
…uld not ignore AM abbreviation for 12th hour'
alexey-milovidov added a commit that referenced this pull request Dec 26, 2020
Backport #18449 to 20.11: Bug fix '#18402 parseDateTimeBestEffort should not ignore AM abbreviation for 12th hour'
alexey-milovidov added a commit that referenced this pull request Dec 26, 2020
Backport #18449 to 20.12: Bug fix '#18402 parseDateTimeBestEffort should not ignore AM abbreviation for 12th hour'
@vladimir-golovchenko vladimir-golovchenko deleted the fix-AM-abbreviation-handling-for-parseDateTimeBestEffort branch December 28, 2020 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix Pull request with bugfix, not backported by default
Projects
None yet
Development

Successfully merging this pull request may close these issues.

parseDateTimeBestEffort should not ignore AM abbreviation for 12th hour
3 participants