only return time from getTimestamp if there is no error