Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] ztrftime(): Fix truncation for %.



On Mon, Dec 24, 2018 at 12:45:45PM +0000, Daniel Shahaf wrote:
> Using straight division likes this makes it do truncation; in the code
> before this patch, the +8 makes it so nsec=11152 would print '1116'
> but nsec=11151 would print '1115'.  (The +8 should probably be +5 ---
> half the radix.)  999999999 is an edge case since it rounds up "to the
> next second".

Looks like Daniel beat me to the punch, eggnog must be slowing me down
today...
-- 
Cheers,
Joey Pabalinas

Attachment: signature.asc
Description: PGP signature



Messages sorted by: Reverse Date, Date, Thread, Author