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

Setting different timestamp? #2

Open
vexillia opened this issue Nov 10, 2024 · 0 comments
Open

Setting different timestamp? #2

vexillia opened this issue Nov 10, 2024 · 0 comments

Comments

@vexillia
Copy link

Trying to config this to use an rss feed from blogger. The timestamp is causing me a few problems.

RSS timestamp
2024-01-07T15:00:00.005+00:00

Linux date equivalent:
date +%Y-%m-%dT%H:%M:%S.%3N%z

Setting date under Dynaconf section in rss2bsky/lib/python3.12/site-packages/rss2bsky/main.py to

DATE_FORMAT="%Y-%m-%dT%H:%M:%S.%3N%z"

Produces this error:

File "/home/vexillia/.local/share/pipx/venvs/rss2bsky/lib/python3.12/site-packages/rss2bsky/main.py", line 108, in main
    datetime.strptime(start_post_date_str, settings.DATE_FORMAT)
  File "/usr/lib/python3.12/_strptime.py", line 554, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/_strptime.py", line 325, in _strptime
    raise ValueError("'%s' is a bad directive in format '%s'" %
ValueError: '3' is a bad directive in format '%Y-%m-%dT%H:%M:%S.%3N%z'

So how do I set the appropriate date format?

Thanks.

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

No branches or pull requests

1 participant