Introduction
Introduction Statistics Contact Development Disclaimer Help
allow use of TZ= environment variable - ics2txt - convert icalendar .ics file t…
git clone git://bitreich.org/ics2txt git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws…
Log
Files
Refs
Tags
README
---
commit 5a6d05cc7d0f248c84b7f22bd1262bd9fdc9e750
parent 4bcfcc3e64d33c6e67b3f6f6359e859d2ee0ff6b
Author: Josuah Demangeon <[email protected]>
Date: Sat, 19 Jun 2021 12:25:35 +0200
allow use of TZ= environment variable
Diffstat:
M ics2tsv.1 | 14 ++++++++++++--
M ics2tsv.c | 4 ++--
2 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/ics2tsv.1 b/ics2tsv.1
@@ -105,6 +105,17 @@ by default in seconds since 1970/01/01.
.El
.
.
+.Sh ENVIRONMENT VARIABLES
+.
+.Bl -tag
+.
+.It TZ
+Timezone to use for printing dates, as documented by
+.Xr tzset 3 .
+.
+.El
+.
+.
.Sh EXAMPLES
.
Convert a calendar from HTTP
@@ -128,11 +139,10 @@ ics2tsv -f CATEGORIES icalendar.ics | awk -F '\et' '{ pri…
.
.Sh SEE ALSO
.
-.Xr awk 1 ,
.Xr cal 1 ,
.Xr calendar 1 ,
.Xr date 1 ,
-.Xr sort 1
+.Xr tzset 3
.
.
.Sh STANDARDS
diff --git a/ics2tsv.c b/ics2tsv.c
@@ -70,9 +70,9 @@ fn_block_end(IcalParser *p, char *name)
if (flag_t == NULL) {
printf("\t%lld\t%lld", block.beg, block.end);
} else {
- strftime(buf, sizeof buf, flag_t, gmtime_r(&block.beg, &tm));
+ strftime(buf, sizeof buf, flag_t, localtime_r(&block.beg, &tm)…
printf("\t%s", buf);
- strftime(buf, sizeof buf, flag_t, gmtime_r(&block.end, &tm));
+ strftime(buf, sizeof buf, flag_t, localtime_r(&block.end, &tm)…
printf("\t%s", buf);
}
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.