Please enable JavaScript
hour() method returns hour in the running user context. hourGMT() returns the GMT hour value. Blog Post: https://www.infallibletechie.com/2023/09/hour-and-hourgmt-in-salesforce-apex.html