diff options
author | Ori Bernstein <ori@eigenstate.org> | 2020-09-25 16:32:32 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2020-09-25 16:32:32 -0700 |
commit | 022bc980b88ca6c06df2f4055ecc0b62231f01ea (patch) | |
tree | a31a209dc3ca1fe81e8871a48764c41cf7cb2ee4 | |
parent | 878911b628207d05a1cf829235e61112bcae59f5 (diff) | |
download | plan9front-022bc980b88ca6c06df2f4055ecc0b62231f01ea.tar.xz |
tmdate(2): fix mistakes in prototype (thanks moody)
-rw-r--r-- | sys/man/2/tmdate | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/man/2/tmdate b/sys/man/2/tmdate index e4123c3e1..ea8a67125 100644 --- a/sys/man/2/tmdate +++ b/sys/man/2/tmdate @@ -29,7 +29,7 @@ struct Tm { }; Tzone *tzload(char *name); -Tm *tmnow(Tm *tm, char *tz); +Tm *tmnow(Tm *tm, Tzone *tz); Tm *tmtime(Tm *tm, vlong abs, Tzone *tz); Tm *tmtimens(Tm *tm, vlong abs, int ns, Tzone *tz); Tm *tmparse(Tm *dst, char *fmt, char *tm, Tzone *zone, char **ep); @@ -221,14 +221,15 @@ Done with full, strict error checking. .IP .EX +#define Fmt "?WWW, ?MM ?DD hh:mm:ss ?Z YYYY" Tm a, b; char *e; -if(tmparse(&a, nil, "Tue Dec 10 12:36:00 PST 2019", &e) == nil) +if(tmparse(&a, Fmt, "Tue Dec 10 12:36:00 PST 2019", &e) == nil) sysfatal("failed to parse: %r"); if(*e != '\0') sysfatal("trailing junk %s", e); -if(tmparse(&b, nil, "Tue Dec 10 15:36:00 EST 2019", &e) == nil) +if(tmparse(&b, Fmt, "Tue Dec 10 15:36:00 EST 2019", &e) == nil) sysfatal("failed to parse: %r"); if(*e != '\0') sysfatal("trailing junk %s", e); |