Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Datetime not working #405

Open
robertmylne opened this issue Apr 15, 2022 · 0 comments
Open

Datetime not working #405

robertmylne opened this issue Apr 15, 2022 · 0 comments

Comments

@robertmylne
Copy link

robertmylne commented Apr 15, 2022

Receiving this issue:
'str' object has no attribute 'tzinfo'

Model:

class Review(Model):
    __table__ = 'reviews'
    __guarded__ = ['id', 'created_at', 'updated_at']
    __dates__ = ['reviewed_at']

Creating:

data = {'reviewed_at': '2021-08-07T09:45:20.000Z'}
Review.create(data)

The date seems to be in a parseable format to me. Not sure why I am getting this error.

I have also tried other formats like 2021-10-02 09:44:04.000.

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

No branches or pull requests

1 participant