Nightclub impresario Peter Gatien’s 30-day jail sentence for cheating the taxman out of $1.4 million has been postponed until September, The Post has learned.

That’s the good news for Gatien, who had been scheduled to turn himself in next week.

The bad news is he’ll be spending the summer fighting state and city claims that his currently-padlocked nightclub, the Tunnel, is a “drug supermarket.”

A judge agreed to the three-month reprieve because it’s going to take Gatien at least that long to deal with the morass of litigation generated by the state’s attempt to revoke the Tunnel’s liquor license and the city’s attempt to padlock it permanently as a public nuisance.

In the last three weeks, the club’s liquor license has been revoked and then reinstated; and the padlock has gone on, come off, and gone back on the club, depending on which courtroom Gatien’s in.

And during that period, the 12th Avenue club’s uncertain future – and the same body of undercover surveillance and buy-and-bust evidence – has been pondered by no fewer than four judges, some of them openly at odds with one another.

Three of the judges continue to have some role in Gatien’s future.

And that’s not counting the panel of four or five Appellate Division judges who are likely to be drawn into the fray this week after a Manhattan Supreme Court judge rules on whether the padlock comes off the Tunnel while hearings are pending.

Here’s the ping-pong chronology to date:

* On April 21, the State Liquor Authority revoked the Tunnel’s liquor license. Score one against Gatien.

* On April 23, Supreme Court Justice Robert Lippman reversed the SLA, ruling that the Tunnel could continue serving liquor pending hearings. Score one for Gatien.

* On April 29, in what Gatien lawyer Ben Brafman called “the worst example of forum shopping I’ve ever seen,” city lawyers went behind Lippman’s back to another judge, Supreme Court Justice Phyllis Gangel-Jacob.

Without Gatien’s lawyers present, and without telling Gangel-Jacob about Lippman, the city won an immediate padlocking of the club on grounds it is a public nuisance. Score another against Gatien.

* On May 6, a furious Judge Lippman reversed Gangel-Jacob, taking the padlock back off while complaining, “What the city has done is one word, and that’s ‘wrong.’ Score another for Gatien.

* On May 7, Gangel-Jacob put the padlock back on. She had warned all sides she’d be “very distressed” if Lippman had reversed her without a hearing. Score another against Gatien.

* On May 10, Gatien’s lawyers sought to do an end run around Gangel-Jacob. They shopped the case to the Supreme Court’s chief administrative judge for civil matters, Justice Stephen Crane, asking in writing that “these matters be accepted for determination by your honor or assigned in such other manner as your honor believes appropriate.”

Crane has not yet taken action.

The judicial jumping around – “forum shopping”- is a common strategy, and entirely legal.

Lawyers consider where they’ll find a favorable judge when deciding which county to file a civil lawsuit in, or whether to file a case in federal or state court.

But in the Gatien matter, which drew Lippman and Gangel-Jacob into a public turf war, accusations of a less ethical kind of forum shopping have been flying.

Each side is accusing the other of attempting to do end runs around judges who have ruled against them.

As the attorneys’ billable hours accrue – billable to Gatien, as well as to city and state taxpayers, the endless hearings continue.