I'm trying to extract the date from a datetime field using date(), but anything prior to 11am returns the previous day. I believe this is because I am operating in a UTC+11 timezone.
I have created a simple model for testing, with the following 3 fields:
x_studio_timestamp (datetime)
x_studio_date_time (datetime)
x_studio_date_only (date)
I have created an automated action on create and update which is triggered on x_studio_timestamp.
The Python code is ...
record['x_studio_date_time'] = record.x_studio_timestamp
record['x_studio_date_only'] =record.x_studio_timestamp.date()
When I create or update a record, the field x_studio_date_time correctly matches x_studio_timestamp. However x_studio_date_only will display the date of the previous day whenever the time portion of x_studio_timestamp is prior to 11am