Date: Tue, 25 Sep 2018 06:24:40 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 231705] pom(6) incorrect output Message-ID: <bug-231705-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D231705 Bug ID: 231705 Summary: pom(6) incorrect output Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: andrew@tao11.riddles.org.uk Created attachment 197476 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D197476&action= =3Dedit patch for pom(6) $ TZ=3DGMT-1; export TZ $ for d in 2018.01.30 2018.01.31 2018.02.01 2018.02.02; do printf "%s: " "$= d"; pom -d $d; done 2018.01.30: The Moon is Waxing Gibbous (97% of Full) 2018.01.31: The Moon is Waning Gibbous (100% of Full) 2018.02.01: The Moon is Full 2018.02.02: The Moon is Waning Gibbous (98% of Full) Line 2 shows incorrect output of "Waning Gibbous" instead of "Waxing Gibbou= s", and 100% instead of the correct 99%. This is caused by the fact that "today" has had 0.5 added to it before comparing against "tomorrow", which has not. In addition, rounding means that the displayed percentage is often higher t= han the true value: today+0.5 is being rounded, not truncated, to 0 decimals by %1.0f. A separate bug causes the computed GMT time to be possibly off by one hour:= the value of tm_isdst from the current time is being kept rather than being set back to -1 when requesting a specific date or time. Patch attached. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-231705-227>