Fixed date save function.