PubDate is a very important item when RSS2.0 is created. It records the article release time. However, the time format requirements under the RSS2.0 standard are strict and must comply with the rfc822 standard. For example, <pubDate> Fri, 22 Feb 2008 15:49:18 GMT </pubDate>. However, some websites in China use RSS2.0 but ignore this time format. As a result, some problems may occur when users subscribe to this source. Using C # to format the time to conform to the rfc822 standard is actually very simple:
DateTime. Now. AddHours (-8). ToString ("r ")
Why do we need to subtract 8 hours? Because the string formatted using ToString ("r") is GMT time, while we are using the + 8 time zone, we need to subtract 8 hours, I forgot to reduce the size by 8 hours at the beginning of the job bean recruitment network, so that all content will be published in the next 8 hours. I suggest you check the content after preparing the RSS to see if it is correct. Rss detection tool address: Workshop/
From: http://www.cqun.com/2010/12/rss20-pubdate.html#links