William Harkness was born in Ecclefechan on December 17th 1837, he was the son of the Rev. James Harkness and Jane Weild. His father James was a physician, a graduate of the University of Edinburgh and a Presbyterian Minister (1832-1839). William studied at Lafayette college 1854-55 and graduated from the University of Rochester in 1858. He graduated in medicine in 1862 and was appointed aide at the U.S. Naval Observatory, Washington,DC in August 1862.
He served as a volunteer surgeon in the 2nd Manassas (Bull Run), and in the repulse of Jubal Early in his attack on the national capital in July 1864 where he again served with the army.
He was a professor of mathematics in the U.S. Navy with the relevant rank of Liuetenant-Commander from August 1863, and continued at the observatory. In 1865 -66 he made a cruise in the Monitor USS Monadnock to study the action of her compasses, and observe terrestial magnatism. He published his findings in the Smithsonian Institute in 1873
Thereafter he became a prominent Astronomer and wrote many scientific papers. He died in Jersey City N.J. February 28th 1903.