Hi Jason,
Yes you are correct about this code it incorrectly is preforming the conversion in this private function. There are two uses of this helper function in our code base. First is with the from_string(...) function which in a very sneaky way stores a value in 10e-7 in the tv_usec field. The second is the utc_now() function, which obviously hits the conversion problem you point out. So the problem only actually happens if you call utc_now().
I have a fix that will be checked in shortly that fixes this up.
Thanks for reporting the issue.
Steve
Yes you are correct about this code it incorrectly is preforming the conversion in this private function. There are two uses of this helper function in our code base. First is with the from_string(...) function which in a very sneaky way stores a value in 10e-7 in the tv_usec field. The second is the utc_now() function, which obviously hits the conversion problem you point out. So the problem only actually happens if you call utc_now().
I have a fix that will be checked in shortly that fixes this up.
Thanks for reporting the issue.
Steve