You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/04/02 20:51:00 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=17707714#comment-17707714 ] 

ASF subversion and git services commented on NIFI-11367:
--------------------------------------------------------

Commit a36040fded2e4cc9b4db4d13aa724e737da48953 in nifi's branch refs/heads/main from krisztina-zsihovszki
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=a36040fded ]

NIFI-11367 Database DATE value displayed incorrectly in record output if timezone is GMT-X

This closes #7103.

Signed-off-by: Peter Turcsanyi <tu...@apache.org>


> 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
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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)