Article View: news.software.readers
Article #262408Re: [slrn] Interesting macro ideas?
From: J.B. Nicholson
Date: Sun, 05 Nov 2017 05:23
Date: Sun, 05 Nov 2017 05:23
22 lines
2157 bytes
2157 bytes
I <jbn@forestfield.org> wrote: > Are you doing the time string conversion in your Elisp code, calling > upon some other program to do the conversion, then accepting what > that program outputs as the string to display, or something else? I don't know how your code does this job, but it looks like date (from GNU coreutils) will do the job: date --date='Sat, 04 Nov 2017 08:25:25 +0000' +'%a %B %d %Y %I:%M:%S %p %Z' looks like it will output the converted date and time in your timezone. So, roughly, this should be a matter of getting the Date: header, vetting it to be sure the result is sane and parseable, passing it to GNU date in the above syntax to be converted, capturing the output, and rewriting the article. I don't much like the idea of passing arbitrary input to an external command (regex vetting should be done but it inherently creates a security hole and an external dependency), but the rest should be feasible.
Technical Details
Message-ID:
<slrnovt81l.p78.jbn@forestfield.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mailReferences:
<slrnovqka0.57k.jbn@forestfield.org> <slrnovquqn.7rp.ylee@columbia.edu> <slrnovt4qa.p78.jbn@forestfield.org>Show Full Headers
Complete Article Headers
Message-ID: <slrnovt81l.p78.jbn@forestfield.org> Subject: Re: [slrn] Interesting macro ideas? Date: Sun, 05 Nov 2017 05:23:01 +0000 From: "J.B. Nicholson" <jbn@forestfield.org> References: <slrnovqka0.57k.jbn@forestfield.org> <slrnovquqn.7rp.ylee@columbia.edu> <slrnovt4qa.p78.jbn@forestfield.org> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail Newsgroups: news.software.readers Organization: solani.org Lines: 22 X-Trace: solani.org 1509859381 5085 eJwFwYkRwDAIA7CV6gTzjGNysP8IlXgd/sKcblxuC2pEvYCAa7RlHo8K1Zlp5upT57xJzfAHGf8Rkw== (5 Nov 2017 05:23:01 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sun, 5 Nov 2017 05:23:01 +0000 (UTC) User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:/Kk6vSigGECaqWkZz6YIFU1rb94= X-NNTP-Posting-Host: eJwFwQkBwDAIA0BLpRAy5DAe/xJ6B3XxojncsNiy0jn6EUwK71A6M0LtVy1s28xEJC46jvABFuMQ3g== X-User-ID: eJwNwokRwDAIA7CV4AjfOODG+4+QnuQWGsgTHsf5G7jvai+kjC1i/IDrmZJaF219y2RIqmIeJNQRkA== X-Received-Bytes: 2091 X-Received-Body-CRC: 1394183836