Night Watch

Night Watch is a Discworld book by Terry Pratchett in which Commander Samuel Vimes accidentally time travels to when he was a rookie police officer and has to teach his younger self to become a hero.