From: ori@eigenstate.org
To: 9front@9front.org
Subject: Re: [9front] Upas: Complete date library conversion.
Date: Sat, 19 Sep 2020 17:38:35 -0700 [thread overview]
Message-ID: <355E3F0395C2F4AF941590B6BCBEBBA3@eigenstate.org> (raw)
In-Reply-To: <4A5FA36F176704A4A945E80A3752EDBA@eigenstate.org>
>> This patch completes the conversion to our new date and
>> time APIs. Needs careful review and testing. The imap
>> part seems to be working. I'm waiting on vultr to unblock
>> port 25 so I can test out the SMTP part of the patch.
>
> One thing to note: This changes the date formats so that
> timezones are unambiguous, using the +HHMM offset syntax.
Oh. This goes with one change to libc:
diff -r 730a2ee35853 sys/man/2/tmdate
--- a/sys/man/2/tmdate Thu Sep 17 16:11:10 2020 -0700
+++ b/sys/man/2/tmdate Sat Sep 19 17:38:18 2020 -0700
@@ -135,6 +135,7 @@
.TP
.B ?
When parsing, this makes the following argument match fuzzily.
+When formatting, this is ignored.
Fuzzy matching means that all formats are tried, from most to least specific.
For example,
.I ?M
diff -r 730a2ee35853 sys/src/libc/port/date.c
--- a/sys/src/libc/port/date.c Thu Sep 17 16:11:10 2020 -0700
+++ b/sys/src/libc/port/date.c Sat Sep 19 17:38:18 2020 -0700
@@ -428,6 +428,9 @@
switch(c0){
case 0:
break;
+ /* Ignore '?' so we can share parse and format strings */
+ case '?':
+ continue;
case 'Y':
switch(w){
case 1: n += fmtprint(f, "%*d", pad, tm->year + 1900); break;
next prev parent reply other threads:[~2020-09-20 0:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 18:53 ori
2020-09-19 18:55 ` [9front] " ori
2020-09-20 0:38 ` ori [this message]
2020-09-20 1:46 ` Anthony Martin
2020-09-20 1:51 ` ori
2020-09-20 3:34 ` ori
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=355E3F0395C2F4AF941590B6BCBEBBA3@eigenstate.org \
--to=ori@eigenstate.org \
--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).