select  cast(timestamptz '2001-01-01 19:00:00 -04:00' as timetz)< cast( timestamptz '2001-01-01 23:00:00 -04:00' as timetz);

-> false.


Bug: https://www.monetdb.org/bugzilla/show_bug.cgi?id=3700

As an idea (and it seems PostgreSQL uses this approach) when you convert to UTC, you should not "reset" count at 24 but allow hours more that 24:00.

This way 23:00 -04:00 will become 27:00 UTC then the comparison will be correct regardless timezone.

Thanks,
John