Hi guys,
I'm trying to understand DateTimeUtil especially with method NewDateTime.When I have a field TransDate and entered as '28/10/2021", by using this code :
utcdatetime myDatetime; myDatetime = DateTimeUtil::newdatetime(TransDate, 0);
Shouldn't this means I do not want the time detail ? In fact TransDate is Date type without time. But strange is why after this code ran, the utc field became "27/10/2021 05:00:PM" ?
My environment when I enter this is :
VM's set as UTC (Coordinated Universal Time), and at time enter is 1 PM, and my User Option - Preferences is set GMT - 8.
I can understand if my VM's time is 1 AM, so calculate back 8 hours will be the previous day 5 PM, but my VM says 1 PM.
But the important is want to the same date, even when the field is with UTCDatetime.
Thanks,