An employee holds marijuana while posing in a photo illustration at a dispensary in Ottawa, Ontario, Canada, June 20, 2018. REUTERS/Chris Wattie

TORONTO (Reuters) - Canada’s military on Friday unveiled a directive governing the use of cannabis by its troops as the country prepares for the drug’s legalization in October.

The directive takes effect on Oct. 17, when pot becomes legal. It prohibits members of Canada’s armed forces from consuming cannabis eight hours before any duty, 24 hours before any operation of weapons or vehicles and 28 days before high altitude parachuting, operating in a hyperbaric environment and serving on a military aircraft.

Cannabis consumption is also prohibited on international operations, according to the directive, which was provided by the military to Reuters.

Canada, a pioneer in approving medical marijuana, is set to become the first OECD country to legalize its recreational use. The pending legalization has sent governments and law enforcement scrambling to set up frameworks governing its use and policing misuse.

It is unclear whether the regulated legal marketplace will be able to meet demand and displace the thriving illegal market.