I am reading a SyndicationFeed by the following method.
XmlUrlResolver resolver = new XmlUrlResolver();
resolver.Credentials = new NetworkCredential("username", "password");
// Create the reader.
XmlReaderSettings settings = new XmlReaderSettings();
settings.XmlResolver = resolver;
XmlReader reader = XmlReader.Create(feedUrl, settings);
SyndicationFeed feed = SyndicationFeed.Load(reader);
However, from the Feed, I need the Last updated time up to milliseconds but the code is returning me only up to the seconds part.
feed.LastUpdatedTime is DateTimeOffset and the value is {06/02/2021 00:06:30 +00:00}
// where as this is the data I get back in Postman
<updated>2021-02-06T00:06:30.652Z</updated>
Any idea how do I get the milliseconds part from the atom feed?
I am answering my own question, basically, we do not get this data from Syndication Feed (That always returns 0 milliseconds, looks like a bug in SyndicationFeed class), so we need to parse the XML directly and extract the data from there. Here is my solution for anyone else looking for a similar issue.