sxmo_hook_tailtextlog.sh: fix timezone parsing
This hook deletes the timezone in the logs when displaying it, for readability purposes. But it only deletes timezones whose UTC offset is negative. This patch fixes it, so negative and positive offsets are recognized and deleted. Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:

committed by
Maarten van Gompel

parent
1b8d58e2ca
commit
f24d0f7e1d
@@ -33,7 +33,7 @@ mkcontactssedcmd() {
|
||||
TODAY="$(date +%F)"
|
||||
YESTERDAY="$(date -d "- 1 day" +%F)"
|
||||
TWO_DAYS="$(date -d "- 2 day" +%F)"
|
||||
DATESEDCMD="s/at.*${TODAY}T/today at /; s/at.*${YESTERDAY}T/yesterday at /; s/at.*${TWO_DAYS}T/two days ago at /; s/-[0-9][0-9][0-9][0-9]://; s/\(-[0-9][0-9]\)T\([0-9][0-9]\)/\1 \2/;"
|
||||
DATESEDCMD="s/at.*${TODAY}T/today at /; s/at.*${YESTERDAY}T/yesterday at /; s/at.*${TWO_DAYS}T/two days ago at /; s/[-+][0-9][0-9][0-9][0-9]://; s/\(-[0-9][0-9]\)T\([0-9][0-9]\)/\1 \2/;"
|
||||
|
||||
# TODO
|
||||
#ALIGNSEDCMD="s/^Sent/<right align>/;s/^Received/<left align>/;"
|
||||
|
Reference in New Issue
Block a user