Reputation: 1581
I have to stamp with info a createdDateTime field's Table,
I used this simple code:
info( strfmt("Date-Time: %1" , myTableDate.createdDateTime) );
On myTableDate I have this value: 05/08/2015 12:48:57
On video in info I see this message:
Date-time: 05/08/2015 10:48:57
I see two hours less than the value stored in table. The field createdDateTime is the standard table's field .
Thanks all,
enjoy!
Upvotes: 1
Views: 461
Reputation: 18051
You will have to correct for timezone, as strFmt
will not do it for you:
info( strfmt("Date-Time: %1", DateTimeUtil::applyTimeZoneOffset(myTableDate.createdDateTime, DateTimeUtil::getUserPreferredTimeZone()));
Upvotes: 2