Explicitly convert datetime to string when storing it in Redis.