Skip to content

Fix isoformat(T) bug#32

Open
drdee wants to merge 1 commit intodatadotworld:masterfrom
wealthsimple:isoformat-bug
Open

Fix isoformat(T) bug#32
drdee wants to merge 1 commit intodatadotworld:masterfrom
wealthsimple:isoformat-bug

Conversation

@drdee
Copy link
Copy Markdown

@drdee drdee commented Apr 26, 2019

This issue is caused by the line https://github.com/datadotworld/tap-redshift/blob/master/tap_redshift/__init__.py#L280
isoformat('T') only works on datetime objects not date objects.

import datetime
today = datetime.date.today()
today.isoformat()
'2019-04-26'
today.isoformat('T')
Traceback (most recent call last):
File "", line 1, in
TypeError: isoformat() takes no arguments (1 given)
now = datetime.datetime.now()
now.isoformat('T')
'2019-04-26T11:56:49.223151'
now.isoformat()
'2019-04-26T11:56:49.223151'

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.

2 participants