datetime: fix negative nsec handling
Seems that problem code part was ported from Lua as is. But there is some difference between modulo operator in C and in Lua. Lua always returns positive value but in C result could be negavive. This difference led to the case when after subtraction nsec part of datetime object become negative that yielded weird result on attempt to get string representation (e.g."2008-02-03T03:36:43.-100Z"). This patch fixes it. Part of #8570 NO_DOC=bugfix NO_CHANGELOG=see next commit
Loading
Please register or sign in to comment