Fixed incorrect use of date timezone when converting to database value.