Github user yjhyjhyjh0 commented on the issue:

    https://github.com/apache/nifi/pull/2082
  
    Thanks for the detail explanation.
    Indeed using local time zone is more reasonable.
    Didn’t notice the date will be transform into local time zone once with 
value format.
    
    Just want to point out that I first try the approach you mentioned (use 
local time zone) will encounter problem with Time type.
    My time zone is UTC+8, which cause time string “01:01:01” in Time type 
will become negative long value.
    This reasonable because Time type only consider time without epoch so it 
will be negative if it’s earlier than “08:00:00”.
    
    However this will not pass the LONG_PATTERN in PutSQL and thus consider a 
negative long value to be in format "HH:mm:ss.SSS” instead of long.
    This will encounter error while parsing for sure : 
java.text.ParseException: Unparseable date: “-28739000”.
    
    If I try your commit with changing the timeStr to “01:01:01" in 
testUsingDateTimeValuesWithFormatAttribute will encounter negative long parsing 
problem which mentioned above.
    Don’t know if you will encounter similar problem with **negative long 
value in Time type**, too?
    
    I've try your commit together with LONG_PATTERN that also match negative 
long value ("^-?\\d{1,19}$”) today and everything works fine now.
    Thanks for any response.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to