Display time in UTC

This commit is contained in:
j4nk 2023-09-05 00:45:45 -04:00
parent 2c766c1f74
commit 0f26ff4a91
4 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
<rss version="2.0"><channel><title>RSS Test</title><link>http://example.com</link><description>An example blog for testing RSS capability of md4tj.</description><language>en-US</language><pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate><managingEditor>editor@example.com</managingEditor><webMaster>webmaster@example.com</webMaster><docs>https://www.rssboard.org/rss-specification</docs><generator>md4tj-rss.el</generator><lastBuildDate>Tue, 05 Sep 2023 00:12:26 GMT</lastBuildDate><item><title>Blog Post 2</title><link>https://example.com/blog/blogpost2.html</link><guid>https://example.com/blog/blogpost2.html</guid><description>
<rss version="2.0"><channel><title>RSS Test</title><link>http://example.com</link><description>An example blog for testing RSS capability of md4tj.</description><language>en-US</language><pubDate>Tue, 10 Jun 2003 04:00:00 GMT</pubDate><managingEditor>editor@example.com</managingEditor><webMaster>webmaster@example.com</webMaster><docs>https://www.rssboard.org/rss-specification</docs><generator>md4tj-rss.el</generator><lastBuildDate>Tue, 05 Sep 2023 00:44:58 GMT</lastBuildDate><item><title>Blog Post 2</title><link>https://example.com/blog/blogpost2.html</link><guid>https://example.com/blog/blogpost2.html</guid><description>
&lt;br&gt;

View File

@ -101,7 +101,7 @@
(cond ((string-match "^@@INCLUDE" line) (md4tj-parse-to-string (nth 1 (split-string line))))
((string-match "^@@LASTUPDATED" line) (concat
(md4tj-begin-tag "p" (list (list "id" "lastupdated")))
"Last updated: " (current-time-string)
"Last updated: " (format-time-string "%a %d %b %Y %H:%M UTC" nil t)
(md4tj-end-tag "p")))
((string-match "^@@DIV" line) (md4tj-begin-tag "div" (list (list "class" (nth 1 (split-string line))))))
((string-match "^@@ENDDIV" line) (md4tj-end-tag "div"))
@ -350,7 +350,7 @@
"Convert abl list elt ELT to html."
(concat "<div class=blogpost>" "\n"
"<a href=\"" (nth 2 elt) "\"><h4>" (nth 0 elt) "</h4></a>" "\n"
"<h5>" (format-time-string "%Y %B %d %H:%M" (string-to-number (nth 1 elt))) "</h5>" "\n"
"<h5>" (format-time-string "%Y %B %d %H:%M UTC" (string-to-number (nth 1 elt)) t) "</h5>" "\n"
"</div>"))
(defun md4tj-blog-all-blogs-list-to-html (abl)

View File

@ -23,11 +23,11 @@
<div id="rssicon"><a href="https://example.com/blog/feed.xml"><img src="img/rss.png" alt="RSS icon" style="width:20px;height:20px;"></img></a></div>
<div class=blogpost>
<a href="https://example.com/blog/blogpost2.html"><h4>Blog Post 2</h4></a>
<h5>2023 March 02 19:44</h5>
<h5>2023 March 03 00:44 UTC</h5>
</div>
<div class=blogpost>
<a href="https://example.com/blog/blogpost1.html"><h4>Blog Post 1</h4></a>
<h5>2023 March 02 19:44</h5>
<h5>2023 March 03 00:44 UTC</h5>
</div>
<br>

View File

@ -75,7 +75,7 @@ int main() {
<p>This is a div that has monospace text.</p>
</div>
<p id="lastupdated">Last updated: Tue Sep 5 00:12:25 2023</p>
<p id="lastupdated">Last updated: Tue 05 Sep 2023 04:44 UTC</p>
<br>