iso 8601 date format in top_status_line
Robert Grimm <[email protected]> Wed, 19 Jan 2011 10:12:19 +0100
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Organization | Disorganized |
| Message-ID | <[email protected]> |
Hi John, hi slrn users,
I am using the C locale for LC_TIME. Though, as I am not used to the
resulting date format in the top_status_line of slrn, I would like to
propose the possibility to use the iso 8601 date format as an option.
#v+
--- slrn-1.0.0~pre26~/doc/manual.txt 2011-01-19 09:03:36.000000000 +0100
+++ slrn-1.0.0~pre26/doc/manual.txt 2011-01-19 09:10:13.115618261 +0100
@@ -3297,6 +3297,7 @@
% percent character
d current date
+ i current date in ISO 8601 date format (YYYY-MM-DD)
n name of the current newsgroup
s name of the current server
t current time
diff -urNad slrn-1.0.0~pre26~/src/misc.c slrn-1.0.0~pre26/src/misc.c
--- slrn-1.0.0~pre26~/src/misc.c 2011-01-19 09:03:36.000000000 +0100
+++ slrn-1.0.0~pre26/src/misc.c 2011-01-19 09:10:13.116618385 +0100
@@ -244,6 +244,12 @@
if (0 != (*len = strftime (buf, sizeof(buf), "%x", localtime(&now))))
retval = buf;
break;
+
+ case 'i':
+ time(&now);
+ if (0 != (*len = strftime (buf, sizeof(buf), "%Y-%m-%d", localtime(&now))))
+ retval = buf;
+ break;
case 'n':
if (NULL != Slrn_Group_Current_Group)
#v-
If there is demand for user defined date formats for the
top_status_line, I could introduce a top_status_date_format variable.
As for me, the iso 8601 date format as an alternative is sufficient.
Rob
--
It's funny there was no one left to notice
when they came for us.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl