Before you use such functions beware that if the times are not UTC, they won't work reliably, so in your case you must make sure that A and B are UTC in all cases. After that, A and B can be converted back to local times, even if they are in different time zones.
The reason is that e.g. SecondsDifference between time zones and or daylight saving time MUST be UTC to guarantee the function result is a simple subtraction. The seconds can be between normal local time and daylight savings time... Let alone if A and B are in different time zones.
So convert A and B to UTC, after calling the function convert back to timezone A and timezone B.
(Or write a more complicated function that take the timezones of A and B as parameters and do the conversion in the function body!)
Do not trust dateutils without checks.