Skip to main content

system.kanoa.date.getClientOffsetMinsFromGateway(clientTZ, tStamp)

This function will return the timezone offset between the client and the gateway for the date passed in. It calls the database to get the timezone offset for the date passed in case the date is in a different timezone to what it is now.


Parameters​

clientTZ String: IANA i.e. America/Los Angeles
tStamp DateTime: Date to return the offset for


Returns​

offsetMins Integer


Example​

clientTZ = 'America/Los Angeles
tStamp = system.date.parse("2025-11-05 12:00:00")
offsetMins = system.kanoa.date.getClientOffsetMinsFromGateway(clientTZ, tStamp)