Convert a date to a unix timestamp