dotnet / dotnet/dotnet-api-docs

Atom published and updated datetime formats not being parsed properly

Open
#9,656 0 comments 0 reactions 0 assignees View on GitHub
area-System.ServiceModel Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

To be added to area-System.ServiceModel

Valid Atom date formats for updated and published times are not being parsed properly.

Only some of the valid Atom date constructs parse properly to DateTimeOffset. The last two in the list below do not parse properly which include the time zone offset. Only zulu time formats seem to parse.

Example Date constructs:

2003-12-13T18:30:02Z
2003-12-13T18:30:02.25Z
**2003-12-13T18:30:02+01:00
2003-12-13T18:30:02.25+01:00**

Reference
[https://learn.microsoft.com/en-us/dotnet/api/system.servicemodel.syndication.syndicationitem.lastupdatedtime?view=dotnet-plat-ext-8.0](url)

The Atom feed processing should be modified to support all valid datetime formats.

Referenced list of feeds for testing [https://www.canada.ca/en/news/web-feeds.html ](url)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.