-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix the Syndication Feed RFC822 DateTimeParser #99194
base: main
Are you sure you want to change the base?
Conversation
RFC822 allows single-digit date values and two-digit year values in the publication date (pubDate). The existing date-time parser only accepted two-digit dates and (for some formats) four-digit years.
"d MMMM yyyy HH:mm:ss zzz", | ||
"ddd, d MMM yyyy HH:mm:ss zzz", | ||
"d MMM yyyy HH:mm:ss zzz", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"ddd, dd MMMM yyyy HH:mm zzz", | ||
"dd MMMM yyyy HH:mm zzz", | ||
"ddd, dd MMM yyyy HH:mm zzz", | ||
"dd MMM yyyy HH:mm zzz", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is removing the overloads without the :ss
part, why? (seconds are optional in the time-of-day
ABNF in RFC 5322)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you mean; I didn't remove any overloads or change the :ss
part. All the previously existing formats are still there, just with the correct number of digits for date and year.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, sorry, it was hidden under the messages about whitespace error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that makes sense, there were a LOT of error messages! 😅
Any chance on getting this merged for .NET 9? |
Any chance of getting this merged for 9.0.2? This is very simple fix for a bug caused by a small typo. There is almost zero risk to merging this, and it would fix a bug that has existed in my application for a year now. |
RFC822 allows single-digit date values and two-digit year values in the publication date (
pubDate
). The existingRfc822DateTimeParser
method inSystem.ServiceModel.Syndication.DateTimeHelper
only accepts two-digit dates and (for some formats) four-digit years.This PR updates the list of date-time formats.
Fixes #99193