Optimisation to spawn less sub-processes

This also changes the stored time to local time from UTC which may be a problem
across timezone changes.
Untabify