casting timestamp to int