The same problem would arise if two travelers journeyed in opposite directions to a point on the opposite side of the earth, 180° of longitude distant.
International date line, imaginary line, on the earth's surface, generally following the 180°meridian of longitude, where, by international agreement, travelers change dates.
For example, if an airplane were to travel westward with the sun, 24 hr would elapse as it circled the globe, but it would still be the same day for those in the airplane while it would be one day later for those on the ground below them.
The apparent paradox is resolved by requiring that the traveler is crossing the dateline change his date, thus bringing the travelers into the agreement when they meet.
The dateline is necessary to avoid confusion that would otherwise result.