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

date doesn't support timezones #22

Open
alien8ion opened this issue Oct 9, 2021 · 0 comments
Open

date doesn't support timezones #22

alien8ion opened this issue Oct 9, 2021 · 0 comments

Comments

@alien8ion
Copy link

Serializable._date() returns a date string with a hard-coded 'GMT' timezone representation regardless of the actual timezone of the datetime object.

Neither the RSS 2.0 Specification nor the RFC 2822 (section 5.1 SYNTAX) require a GMT/UTC value for the datetime, just that it follow the specified format.

I would suggest that instead of blindly returning 'GMT' for the timezone, either use the tzname() of the timezone aware datetime object and default to 'UTC' if it returns None, or convert any timezone aware datetime objects to UTC and then return the new value + 'UTC' as the timezone value.

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