This phrase is used, both afloat and ashore, to indicate that the time of day has been reached at which it is acceptable, variously, to have
lunch or (more commonly) to have an alcoholic beverage. In modern parlance, the latter usage typically refers to early evening, but the phrase is thought originally to have referred to late morning and to the sun's ascent past a particular yard. The actual time that the sun would pass a particular yard would depend greatly on the ship's
latitude and
heading, as well as the height of her masts, but the phrase seems to have originated in the north Atlantic, where, in summer, this would have typically been at about 11 a.m. This was the time at which, by custom and rule, the first
rum "tot" of the day was issued to men (the senior rates had their tots neat, while the junior rates had theirs diluted with water), hence its connection with taking one's first alcoholic drink of the day. The earliest mention of this phrase collected by the
OED is in
Rudyard Kipling's
From Sea to Sea in 1899, where it is used as a metaphor referring to drinking habits. However, the phrase was in use earlier, in the same context. One example is from the first volume of
Life, from the issue of May 31, 1883. ==The yardarm's use in maritime punishment==