potiuk commented on a change in pull request #21811:
URL: https://github.com/apache/airflow/pull/21811#discussion_r815481666
##########
File path: airflow/providers/sftp/sensors/sftp.py
##########
@@ -54,4 +63,9 @@ def poke(self, context: 'Context') -> bool:
raise e
return False
self.hook.close_conn()
- return True
+ if self.newer_than:
+ _mod_time = datetime.strptime(mod_time, '%Y%m%d%H%M%S')
+ _newer_than = make_naive(self.newer_than) if not
is_naive(self.newer_than) else self.newer_than
+ return _newer_than <= _mod_time
Review comment:
I think you shoudl convert all dates to UTC. It's surprisingly hard to
find what is the timezone of st_mtime but all signs point at UTC.
--
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]