mirror of
https://github.com/apache/nifi.git
synced 2025-02-07 02:28:31 +00:00
c6f4421c8e
The unit test for DATE type used GMT timezone, that causes an assertion error in timezones such as EST (-5). We need to use local timezone instead of GMT, as Derby and PutSQL uses local timezone. The unit test failed before as follows: - Unit test code, passed: '2002-02-02 GMT' - PutSQL code convertedi it to local: '2002-02-01 EST', and stored as '2002-02-01' in Derby database without timezone info - Unit test code SELECT the inserted value, passed a GMT calender, then got epoch timestamp, which was '2002-01-31' Support negative long value for timezones ahead of UTC. - For timezones such as '+0800', it's possible that a local time e.g. '02:03:04' can be a negative epoch value. This commit changes LONG_PATTERN so that it can accept nevative values. - Changed time values in unit tests to verify negative epoch values, and avoid using the same digits among different time unit for better readability. This closes #2082