Converting a timestamp to a UNIX timestamp