A timepiece comprising: a hand wheel configured to rotate around an axial center thereof; a motor coupled with the hand wheel and configured to rotate the hand wheel; a detection wheel configured to rotate around an axial center thereof, associated with rotation of the hand wheel; a detection hole that penetrates the detection wheel in a direction along the axial center; a photo sensor including: a light emitting element that emits light to a detection position on an orbit along which the detection hole moves associated with the rotation of the detection wheel, and a light receiving element that is disposed facing the light emitting element with the detection wheel therebetween; and a control unit configured to drive and control the motor, wherein the control unit determines one of a first state and a second state different from the first state, based on an amount of light received by the light receiving element each time the motor is driven a predetermined number of steps, characterised in that the control unit identifies a switching position at which the first state is switched to the second state when the control unit consecutively determines the first state for a first number of steps and thereafter consecutively determines the second state for a second number of steps, the first number of steps and the second number of steps both being at least 2, and the control unit sets a position one step shifted from the identified switching position to be a reference position and stores information concerning the reference position to a storage unit. a hand wheel configured to rotate around an axial center thereof; a motor coupled with the hand wheel and configured to rotate the hand wheel; a detection wheel configured to rotate around an axial center thereof, associated with rotation of the hand wheel; a detection hole that penetrates the detection wheel in a direction along the axial center; a photo sensor including: a light emitting element that emits light to a detection position on an orbit along which the detection hole moves associated with the rotation of the detection wheel, and a light receiving element that is disposed facing the light emitting element with the detection wheel therebetween; and a light emitting element that emits light to a detection position on an orbit along which the detection hole moves associated with the rotation of the detection wheel, and a light receiving element that is disposed facing the light emitting element with the detection wheel therebetween; and a control unit configured to drive and control the motor, wherein the control unit determines one of a first state and a second state different from the first state, based on an amount of light received by the light receiving element each time the motor is driven a predetermined number of steps, characterised in that the control unit identifies a switching position at which the first state is switched to the second state when the control unit consecutively determines the first state for a first number of steps and thereafter consecutively determines the second state for a second number of steps, the first number of steps and the second number of steps both being at least 2, and the control unit sets a position one step shifted from the identified switching position to be a reference position and stores information concerning the reference position to a storage unit.