I’m looking to output a timestamp of when content was published within Umbraco, in the correct format required by the HTML5 <time> element.
For example:
<time datetime="2012-02-28T20:00+00:00" pubdate>February 28, 2012</time>
Is there a way to achieve this within Umbraco or with Razor? I know with PHP there’s a particular “W3C” way of outputting timestamps: http://goo.gl/sEFsh.
More info on correct formatting of this element can be found here: http://html5doctor.com/the-time-element/
It looks like the best option for this might be to use the global “UpdateDate” like this:
Seems to output the desired format and the date published rather than the current date. Can anyone see any issues with this solution?