JAKARTA, Indonesia — In West Java, teenagers wondering whether to ask out their latest crush had better make up their minds fast. As of Oct. 1, they’ll be banned from dating after 9 p.m.

The decision was announced last week by the authorities of Purwakarta district, about 60 miles east of the Indonesian capital Jakarta. The new regulation, which will only apply to youths under 17, is aimed at protecting their morality, preventing unwanted pregnancy and protecting the honor of families, local media reported, quoting the head of Purwakarta district, Dedi Mulyadi.

Mulyadi also told AFP the regulation will ensure teenagers go to bed early and embrace a more traditional way of life. “Back in the day, you could not visit a neighbor after 9 p.m. because villagers would be in bed, preparing to wake up at dawn to till their [rice] paddy fields,” he said.

More from GlobalPost: Probing vaginas is the only way to test a woman's morality, Indonesia's military assures us

Mulyadi is very serious about this. Local patrols and new CCTV cameras will help ensure the regulation is enforced. And teenagers might think twice before breaking the law, as the punishment could turn innocent dating into serious commitment.

“If they break the rules three times, the village council may ask for the parents to marry them,” Mulyadi said.

It’s not clear how this would be enforced, as the legal age for marriage in Indonesia is 16 years old. But teenagers might not want to take their chances, as underage marriage ceremonies still occur in rural parts of Indonesia.

Purwakarta is not the only place in the country considering eyebrow-raising measures to prevent premarital sex. In Sumatra’s Bengkulu province last June, the local parliament said it was drafting a bill to limit the sales of condoms and other contraceptive methods, especially to minors.

More from GlobalPost: Indonesia is going crazy over gemstones with magical powers

The belief that contraceptive methods encourage promiscuity is common in conservative Indonesia, and so are calls for restrictions on their sale. But in Bengkulu, the regulation is actually presented as a means to fight HIV, the virus that causes AIDS, which is on the rise in the country. If condoms are not easily available, people will refrain from having sex altogether and won’t be infected, the Bengkulu lawmakers argue.

The logic behind this might seem questionable, but the proposed bill is actually supported by the provincial health agency. Amin Kurnia, the head of the agency, said he “highly appreciates” a plan that “proves the council members are very concerned about HIV and AIDS.”