On Fri, 6 Nov 2020 00:55:22 GMT, Coleen Phillimore <[email protected]> wrote:
>> Right, `snprintf(tmp, sizeof(tmp), "%d", millisecs);` needs to be
>> `snprintf(tmp, sizeof(tmp), "%.3d", millisecs);` to pad it out correctly.
>
> timestamp 05.11.2020 19:54:13.100 EST
>
> This is what I get (in a small test program) for 100 ms with the existing
> code. Is this not right?
char tmp[10 + 1];
snprintf(tmp, sizeof(tmp), "%.3d", millisecs);
snprintf(tbuf, ltbuf, "%s.%s %s", timestamp_date_time, tmp,
timestamp_timezone);
This also gets the same thing.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1067