Issue Summary
Dates lagging one day are saved in the Database when using Type Value Date attribute in Insight and Server timezone is GMT-XXX.
Steps to Reproduce
- Set up a Jira instance with Insight 8.9.1 with America/Los_Angeles TimeZone (GMT-8)
- Ensure Server - Jira Timezones are all set to:
- jira.default.timezone: America/Los_Angeles
- jvm.system.timezone : US/Pacific
- Mysql Database Timezone: PDT


- Create an Object Type and add a Date Attribute
- Create an object and set a date, for instance, 12/Sep

Expected Results
Date should be stored as 2021-09-12
Actual Results
Date is stored as 2021-09-11 17:00:00.
Exactly -7 hours (Pacific Daylight Time) behind GTM
Query to get an attribute value:
SELECT
OTA.NAME OTA_NAME,
OAV.DATE_VALUE
FROM AO_8542F1_IFJ_OBJ O
LEFT OUTER JOIN AO_8542F1_IFJ_OBJ_ATTR OA ON O.ID = OA.OBJECT_ID
LEFT OUTER JOIN AO_8542F1_IFJ_OBJ_TYPE_ATTR OTA ON OTA.ID = OA.OBJECT_TYPE_ATTRIBUTE_ID
LEFT OUTER JOIN AO_8542F1_IFJ_OBJ_ATTR_VAL OAV ON OA.ID = OAV.OBJECT_ATTRIBUTE_ID
WHERE OA.OBJECT_ID = 4 and OTA.NAME = 'Date'

The below call is made in the atlassian-jira.log.log file. We observed date is already incorrect.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available