A Farmington man was ordered to spend two months in jail for stalking Salt Lake City Mayor Erin Mendenhall last year.