I'm not sure under what circumstances you're coding this for, but using the Z code indicates the patient HAD smoked at some point. However if the patient had been a smoker, as in dependent on nicotine, then the more appropriate code would be from the F17- section. Perhaps a better explanation would be someone who was a "social smoker" versus someone who smoked 3 packs a day because they were addicted. If your coding for a patient who was a previous smoker (not the on-and-off, social kind), then I suggest maybe F17.211 Nicotine dependence, cigarettes, in remission.
I also agree that there's not a "time frame" for these codes. If they smoked, they smoked; time doesn't change that fact.