All timestamps and all durations are now milliseconds. Move coversions
to common.{py,php}.