Date serializes in UTC time instead of local

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