Catching possible exceptions thrown by getUnixTimestamp