Hisoka-X commented on code in PR #9526:
URL: https://github.com/apache/seatunnel/pull/9526#discussion_r2234808912


##########
docs/zh/connector-v2/source/CosFile.md:
##########
@@ -74,6 +74,8 @@ import ChangeLog from '../changelog/connector-file-cos.md';
 | binary_chunk_size                     | int     | 否   | 1024                |
 | binary_complete_file_mode             | boolean | 否   | false               |
 | common-options                        |         | 否   | -                   |
+| file_filter_modified_start  | string  | 否    | -                   | 
按照最后修改时间过滤文件。 要过滤的开始时间(包括改时间),时间格式是:`yyyy-MM-dd HH:mm:ss`, 时区是GMT+8             
                                                                     |
+| file_filter_modified_end    | string  | 否    | -                   | 
按照最后修改时间过滤文件。 要过滤的结束时间(不包括改时间),时间格式是:`yyyy-MM-dd HH:mm:ss`, 时区是GMT+8            
                                                                                
                         |

Review Comment:
   why default time zone is `GMT+8`? It should be system default time zone.



##########
seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/reader/AbstractReadStrategy.java:
##########
@@ -145,6 +154,47 @@ public List<String> getFileNamesByPath(String path) throws 
IOException {
         return fileNames;
     }
 
+    protected boolean filterFileByModificationDate(FileStatus fileStatus) {
+
+        long fileModifiedTime = fileStatus.getModificationTime();
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd 
HH:mm:ss");
+        dateFormat.setTimeZone(TimeZone.getTimeZone("GMT+8"));

Review Comment:
   ditto



-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to