You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Zsihovszki Krisztina (Jira)" <ji...@apache.org> on 2023/03/30 15:18:00 UTC

[jira] [Assigned] (NIFI-11367) Database DATE value displayed incorrectly in record output if timezone is GMT-X

     [ https://issues.apache.org/jira/browse/NIFI-11367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zsihovszki Krisztina reassigned NIFI-11367:
-------------------------------------------

    Assignee: Zsihovszki Krisztina

> Database DATE value displayed incorrectly in record output if timezone is GMT-X 
> --------------------------------------------------------------------------------
>
>                 Key: NIFI-11367
>                 URL: https://issues.apache.org/jira/browse/NIFI-11367
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Zsihovszki Krisztina
>            Assignee: Zsihovszki Krisztina
>            Priority: Major
>
> 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.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)