[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[www] branch master updated: rssg: gnu date
From: |
gnunet |
Subject: |
[www] branch master updated: rssg: gnu date |
Date: |
Mon, 04 Nov 2019 17:34:43 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository www.
The following commit(s) were added to refs/heads/master by this push:
new f95696d rssg: gnu date
f95696d is described below
commit f95696d36fd084997bff907e157624b8c7f22ce9
Author: ng0 <address@hidden>
AuthorDate: Mon Nov 4 16:31:55 2019 +0000
rssg: gnu date
---
rssg | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/rssg b/rssg
index 1a2e596..ef86018 100755
--- a/rssg
+++ b/rssg
@@ -125,9 +125,17 @@ rel_to_abs_urls() {
date_rfc_822() {
- if date --version >/dev/null 2>&1; then
- date '+%a, %d %b %Y %H:%M:%S %z' \
- "$(echo "$1"| tr -cd '[:digit:]')0000"
+# perl -MPOSIX -le 'print strftime "%a, %d %b %Y %H:%M:%S %z",
(localtime "$1");'
+# x="$(echo "$1"| tr -cd '[:digit:]')0000"
+# awk -v a="$x" '{print strftime("%a, %d %b %Y %H:%M:%S %z", x)}'
+ if date --version >/dev/null 2>&1; then
+ in="$(echo "$1"| tr -cd '[:digit:]')0000"
+ year=$(echo $in | cut -c1-4)
+ month=$(echo $in | cut -c5-6)
+ day=$(echo $in | cut -c7-8)
+ hour=$(echo $in | cut -c9-10)
+ minute=$(echo $in | cut -c11-12)
+ date '+%a, %d %b %Y %H:%M:%S %z' "$(echo "$year"-"$month"-"$day"
"$hour":"$minute")"
else
date -j '+%a, %d %b %Y %H:%M:%S %z' \
"$(echo "$1"| tr -cd '[:digit:]')0000"
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [www] branch master updated: rssg: gnu date,
gnunet <=