TORONTO -- A Spanish court has ruled that an energy giant does not have to pay workers for coffee and cigarette breaks, enraging the country's largest labour union.

The decision from Spain's National Court came down last December, but is only attracting attention now, after the Comisiones Obreras (CCOO) union reportedly vowed to appeal it.

At the heart of the dispute is a change made last year to Spanish labour laws. The government now requires many companies to keep track of employees' hours worked. Unions have backed the law, believing it will put an end to the unpaid overtime that they say adds up to the equivalent of hundreds of thousands of full-time jobs each year.

According to the latest OECD figures, Spanish workers reported an average of 1,701 hours of work – paid and unpaid – in 2018. That number is in line with the average of 1,708 hours reported in Canada, but well ahead of the U.K., France, Germany and many other countries in Western Europe.

Galp Energia, a Portuguese energy firm that has significant assets in Spain, responded to the new regulation by emailing its Spanish employees to define what it counts as working hours. Not included in the seven hours and 45 minutes Galp expects office employees to spend working each day, the company said, is time spent outside the building – even if all the employee is doing is smoking a cigarette or grabbing a coffee.

The company is able to monitor these breaks because its office has a controlled-access system that logs every time a worker enters the building.

CCOO accused Galp of breaking its collective agreement with the union by implementing these and other time controls. It took the company to court, arguing that the controls should be struck down. A judge disagreed, saying that if the workers wanted guarantees of paid coffee and smoke breaks, they should have negotiated them into their collective agreement.

This ruling could set a precedent for other companies in Spain to deduct coffee and smoke breaks from the working day if they do not have explicit agreements to include them.

The union is expected to appeal the decision to Spain's Supreme Court. According to progressive-focused news outlet Nueva Tribuna, a CCOO executive said that the union believes the new regulation only applies to recording the start and end of the work day, not every break taken in-between.