From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] date -t vs rfc3339 i which is correct:
Date: Tue, 10 Dec 2019 20:17:25 +0100 [thread overview]
Message-ID: <241E176E19E4EE22ACD22FDCCFAA6E31@felloff.net> (raw)
In-Reply-To: 14D90BE78DD6FC8C05C78941DB9D6103@ewsd.inri.net
my interpretation is that this rfc3339 is a SUBSET of iso-8601 and we
hit edge case in iso-8601 that is outside of rfc3339. we'r correct
for iso 8601 but not for rfc3339. i think this should be changed
so we cover both specifications and make date -t more widely usefull.
--- a/sys/src/cmd/date.c Mon Dec 09 18:08:02 2019 +0100
+++ b/sys/src/cmd/date.c Tue Dec 10 20:15:42 2019 +0100
@@ -15,7 +15,7 @@
char*
isodate(Tm *t)
{
- static char c[25]; /* leave room to append isotime */
+ static char c[26]; /* leave room to append isotime */
snprint(c, 11, "%04d-%02d-%02d",
t->year + 1900, t->mon + 1, t->mday);
return c;
@@ -39,7 +39,7 @@
c[9] = '-';
tz = -tz;
}
- snprint(c+10, 5, "%02d%02d", tz / 60, tz % 60);
+ snprint(c+10, 6, "%02d:%02d", tz / 60, tz % 60);
} else {
c[9] = 'Z';
c[10] = 0;
--
cinap
next reply other threads:[~2019-12-10 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 19:17 cinap_lenrek [this message]
2019-12-10 19:34 ` ori
2019-12-10 19:48 ` Stanley Lieber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=241E176E19E4EE22ACD22FDCCFAA6E31@felloff.net \
--to=cinap_lenrek@felloff.net \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).