If you cross the IDL on your journey towards east, 24 hours are subtracted from your time, and if you cross it when going west, 24 hours are added to your time. Similarly for every 15° crossed towards east, you earn an hour, and for every 15° crossed towards west, you lose one.