Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C csvkit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wireservice
  • csvkit
  • Issues
  • #436
Closed
Open
Issue created Aug 10, 2015 by Administrator@rootContributor

csvsql: dateutils.parse gives false positive for certain strings

Created by: fitnr

I've run into a problem where csvsql mistakenly casts certain fields as TIME. If a column contains only "A", "M", and "AM", csvsql will consider it a TIME column.

I think I've identified the use of dateutils.parse in typeinference.py as the root of the problem.

This is an issue with dateutil, and has been fixed as of v2.4.2. So the best fix will be to update the requirements.

If updating to [email protected] isn't possible, my suggested fix is to add a check if the parsed datetime exactly matches the given default. This will have the side effect of making it impossible to properly recognize a valid data field containing 9999-12-31 00:00:00.

Assignee
Assign to
Time tracking