Homeless people in have the right to camp out in Victoria's parks, but not during the day, a B.C. Supreme Court judge has ruled.

David Arthur Johnston and David Michael Shebib applied to the high court to set aside their bylaw convictions for setting up cardboard lean-tos in Centennial Park, near City Hall. They argued that the Charter of Rights and Freedoms guaranteed them the right to set up temporary shelters in public spaces.

According to newly revised Victoria bylaws, temporary structures are forbidden in public parks between 7 a.m. and 7 p.m.

Johnston and Shebib set up their cardboard structures in February 2009, and after ignoring written warnings, were promptly convicted of a bylaw infraction in provincial court.

In their Supreme Court appeal, the pair argued that the bylaw infringed on their right to sleep during the day, and that homeless people with mental issues might not be able to sleep at night.

But in his decision dismissing the appeal Tuesday, Justice J. Keith Bracken wrote that Johnston and Shebib weren't actually sleeping in their huts during the day.

"There are several photographs in evidence at the trial showing the shelter the appellants erected and there is nothing in the photographs, or the evidence generally, to suggest that either of the appellants have any need for daytime shelter so they can sleep," the judge wrote.

Bracken said the court needed to weigh the public's interest in enjoying the park with the right to shelter.

"The restrictions imposed by the amended bylaw allow those who wish to use parks and public places the freedom to do so without the presence of temporary shelters. The city is able to carry out its function and maintain its parks and prevent the damage that might be caused by the presence of temporary shelters at all times during the day," he wrote.

The judge also suggested that more services and opportunities to head indoors would be available to homeless people during the day, and that during the warmer months, daytime shelter wouldn't be required at all.

A B.C. Court of Appeal decision last year prompted the city to revise its bylaws on camping in public spaces, which had originally forbidden tents in parks overnight.

According to that decision, the number of homeless people in Victoria exceeded the number of shelter beds, and the regulations "deprive homeless people of life, liberty and security of the person in a manner not in accordance with the principles of fundamental justice."