The times can be determined astronomically. For example, local time zero can be defined to be that time when some star, say Arcturus, is observed to cross the imaginary line of longitude running directly north-south through the local position; the corresponding standard time zero would be that time when the same star crosses the prime meridian. Stars are far enough away from us that these two crossings will occur at different moments of time. Carefully determined tables of prime meridian crossing times of various stars would allow navigators to set their local clock. To determine the difference between the local clock and the standard clock, closer astronomical events like an eclipse or occultation of the moon or a planet can be used. These events are observed at essentially the same moment of time whatever the observer's location on Earth, and furthermore are predictable. So comparison of the local time of the close event with its tabulated standard time would give the time difference necessary to calculate longitude.
In 1609, after hearing Flemish reports of a spyglass constructed from two lenses that would enlarge the image of distant objects, Galileo set about the design and construction of the first astronomically useful telescope.13 In March of the next year, Galileo reported his discovery of the four principal moons of Jupiter . For the first time, here was an orbital system that was demonstrably not centred about the Earth. Galileo argued that this was compelling evidence against the the Ptolemaic system (all celestial bodies revolve around a fixed Earth) and in favour of the Copernican sun-centred system. His public support of the Copernican system as a true representation of the movement of the planets (as opposed to a convenient calculational model) brought Galileo into conflict with those who would interpret certain Biblical passages literally . Some of these people wielded considerable influence within the Catholic church of Rome; by order of Pope Urban VIII he was banned from further publication and placed under house arrest from 1633 until his death in 1642. This did not prevent him from continuing his scientific work.14
But this momentous scientific discovery also had commercial potential. King Philip III of Spain had offered a handsome prize to anyone who could come up with a practical method of determining a ship's position when out of sight of land. Galileo hit upon the idea of using the predicted times of the eclipses of Jupiter's moons to provide the common celestial clock necessary to determine longitude. In November of 1616 he began negotiations with Spain for navigational uses of his astronomical discoveries and in 1617 worked on developing a telescope for use at sea while continuing his negotiations with Spain . Unfortunately the tables he produced were not accurate enough for their intended purpose -- the theory at the time did not account for the perturbations of the moons due to their mutual interaction .
Although many writers advocated the use of telescopes at sea, those who appreciated the practical difficulty of directing a very long telescope at Jupiter while aboard a lively ship were skeptical and undoubtedly amused by the proposed method. It was never to become successful at sea. 15 But on land, very accurate determinations of longitude could be obtained this way and resulted in a substantial reform of geography in the 17th and 18th centuries.