Skip to content

Commit

Permalink
Fix datetime format for published date
Browse files Browse the repository at this point in the history
  • Loading branch information
jacklinke committed Aug 21, 2024
1 parent 6a0a776 commit be2b20f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _get_publish_date(self, published_at: str = None) -> str:
"""Return the publish date, defaulting to now if not provided."""
if published_at:
return published_at
return datetime.now(ZoneInfo("UTC")).strftime("%Y-%m-%d %H:%M:%S")
return datetime.now(ZoneInfo("UTC")).strftime("%Y-%m-%dT%H:%M:%SZ")

def build_post_data(self) -> Dict[str, Any]:
"""Build the post data for the Hashnode API."""
Expand Down

0 comments on commit be2b20f

Please sign in to comment.