Description
Suppose a database stores a date in a field e.g. "2023-03-10".
QueryDatabaseTableRecord returns the value of the date field as "2023-03-10" if local timezone is GMT+ , but it returns wrong date, actual day -1 ("2023-03-09") if the local timezone is GMT-x.
The reason is the date value taken from the DB was converted to UTC (1).
Later on NiFi converts the date value to local time. (2)
In step#1, the "2023-03-10" in converted to 10th March 2023 00:00 UTC.
In step#2, when date is converted to local date, GMT-5 for example, the result will be 9th March 2023 19:00, so the day changes, it will be set to 9th March 2023 ("2023-03-09")
Since NiFi uses local time there is no need to convert the database date values to UTC.