Fix bug where json encoded timedeltas returning 0 seconds failed