Date serializes in time instead of local string

Transferring serialized dates between computers with different timezone settings leads to inconsistencies. Using getTime(), fromTime() fixes this.