tpalfy commented on a change in pull request #4721:
URL: https://github.com/apache/nifi/pull/4721#discussion_r542483971



##########
File path: 
nifi-nar-bundles/nifi-extension-utils/nifi-processor-utils/src/main/java/org/apache/nifi/processor/util/list/AbstractListProcessor.java
##########
@@ -207,6 +225,39 @@
         .defaultValue(BY_TIMESTAMPS.getValue())
         .build();
 
+    public static final PropertyDescriptor TIME_ADJUSTMENT = new Builder()
+        .name("time-adjustment")
+        .displayName("Time Adjustment")
+        .description("If the system hosting the files is in a different time 
zone than NiFi, either it's timezone or the numerical difference should be set 
here." +
+            " If a timezone is specified, NiFi tries to calculate the time 
difference." +
+            " If a numeric value is set, its value can be either a single 
integer (milliseconds) or in HH:mm/HH:mm:ss format." +
+            " EXAMPLE: NiFi is hosted in UTC, File Server is hosted in EST. In 
this case 'Time Adjustment' value should be -05:00:00 or 18000000." +
+            " If the locations were reversed i.e. NiFi is hosted in EST, File 
Server is hosted in UTC, the value should be 05:00:00 or 18000000." +
+            " NOTE: Any mid-year changes (due to daylight saving for example) 
requires manual re-adjustment in this case."
+        )
+        .expressionLanguageSupported(ExpressionLanguageScope.VARIABLE_REGISTRY)
+        .required(false)
+        .addValidator(new Validator() {
+            Pattern signed_integer_or_signed_HHmm_or_HHmmss = 
Pattern.compile("-?(\\d{2}:\\d{2}(:\\d{2})?)|-?\\d+");

Review comment:
       I think it's actually better for anyone who reads to code to see the 
validation expression right here in the validator.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to