How to get the current hour in the local time zone of the context user using apex in Salesforce?
hour() returns the hour component of a Datetime in the local time zone of the context user. Sample Code: trigger CaseTrigger on Case (before insert) { Boolean tomorrowTargetBool = system.now().hour() ....