Pretty sure its only looking at the number of Seconds. Try setting one off by 6 seconds and see if you get an alert. Seems to be working fine here as well on ~150 machines.
On a Server 2022 DC with PS 5.1.20348.859, I had the same problem. It wasn’t an issue of misunderstanding that seconds is the unit of measurement. The Skew variable wasn’t being processed as an integer, so the script was checking … $STRING -gt $INT and failing.
I forced the Detected Skew in the if statement to be an INT and all is well.
if ( [int]($DetectedSkew.Skew -replace '[^0-9.]') -gt $MaximumSkewInSeconds) {...}