properly serialize task timestamps, fixes #819