My Org is set to GMT+1 which is my timezone. (Stated in the Company Information).
I have created a record at 11:30 am but when I retrieve the CreatedDate field it says that it was created at 10:30 am. Why is the reason for that?
Thanks in advance.
If I do:
datetime baseTime = datetime.now(); System.debug('baseTime '+baseTime); Integer hour = baseTime.hour(); System.debug('hour '+hour); Integer hourGMT = baseTime.hourGmt(); System.debug('hourGMT '+hourGMT);
Then in the debug shows
My time is 12:39 the same as GMT+1 in the Org but the records are saved at 11:39 the same then I do datetime.now() which shows 11:39