Use millis for joda DateTimeFormatter.print()

Fixes #4782.