From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eigenstate.org ([206.124.132.107]) by ewsd; Tue Dec 10 14:34:42 EST 2019 Received: from eigenstate.org (localhost [127.0.0.1]) by eigenstate.org (OpenSMTPD) with ESMTP id ada49816; Tue, 10 Dec 2019 11:34:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=eigenstate.org; h= message-id:to:subject:date:from:in-reply-to:mime-version :content-type:content-transfer-encoding; s=mail; bh=c5OqWeA7ob6b MtSiFtYUp+s4KwE=; b=lvMRextDC7lWCGTWuOHYyoe5ivhB998TmmnQupE90pzE Td15sWYSdG41iHbHvlDazzIqTmUy2AKNcdtzjzHyz9dZq+aRLbAaWePFYtPoD8Pa 7ARQKSoXTY0BOy9jmrWC6GCH9zw0OLpTv9yV+6lZmam7UpMzGt91cWMIL1P5kwI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=eigenstate.org; h=message-id :to:subject:date:from:in-reply-to:mime-version:content-type :content-transfer-encoding; q=dns; s=mail; b=PzcnMrF+oBJHeqm00IX JnKBeLYzQquicDFggfpbTzdzBxeyWHQRENt49cHGRWlZhiYQkITyY1L/CvufYAXY oqUu85bZpQtn6hX+/allx8KTmDaCKfA6xi95hl7hdmNjTfMZ4TYZUftDzLVy6MAo I23f37vKpt1nM20Pch/A83pE= Received: from abbatoir.hsd1.ca.comcast.net (c-76-21-119-139.hsd1.ca.comcast.net [76.21.119.139]) by eigenstate.org (OpenSMTPD) with ESMTPSA id 4aace578 (TLSv1.2:ECDHE-RSA-AES256-SHA:256:NO); Tue, 10 Dec 2019 11:34:41 -0800 (PST) Message-ID: <361ED9A9F4CE301DE0E938744EF73C41@eigenstate.org> To: cinap_lenrek@felloff.net, 9front@9front.org Subject: Re: [9front] date -t vs rfc3339 i which is correct: Date: Tue, 10 Dec 2019 11:34:40 -0800 From: ori@eigenstate.org In-Reply-To: <241E176E19E4EE22ACD22FDCCFAA6E31@felloff.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: wrapper blockchain > 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 The change looks good to me, but one question: Is there anything that uses the output of 'date -t' and cares? (How did we run into this?)