Hi,
However when passing in the timezone, it still triggered on the Server Time (in my instance Sydney Australia time) instead of the intended Timezone.
That is 5pm Sydney time, not 5pm New York time. See example below
WaitForNewYorkEODStartTime = TimeSensor(
task_id='WaitForNewYorkEODStartTime',
target_time=time(hour=17, minute=0, second=0, microsecond=0, tzinfo=timezone('America/New_York')),
dag=dag
)
Should this be supported?
Log below:
[2015-10-29 00:00:14,102] {models.py:107} INFO - Filling up the DagBag from /home/calypso/calypso/airflow/dags/simpleeod.py
[2015-10-29 00:00:14,102] {models.py:174} INFO - Importing /home/calypso/calypso/airflow/dags/simpleeod.py
[2015-10-29 00:00:14,261] {models.py:226} INFO - Loaded DAG <DAG: simpleeod>
[2015-10-29 00:00:17,574] {models.py:107} INFO - Filling up the DagBag from /home/calypso/calypso/airflow/dags/simpleeod.py
[2015-10-29 00:00:17,574] {models.py:174} INFO - Importing /home/calypso/calypso/airflow/dags/simpleeod.py
[2015-10-29 00:00:17,736] {models.py:226} INFO - Loaded DAG <DAG: simpleeod>
[2015-10-29 00:00:17,777] {models.py:874} INFO -
--------------------------------------------------------------------------------
New run starting @2015-10-29T00:00:17.774897
--------------------------------------------------------------------------------
[2015-10-29 00:00:17,785] {models.py:907} INFO - Executing <Task(TimeSensor): WaitForNewYorkEODStartTime> on 2015-10-28 00:00:00
[2015-10-29 00:00:17,785] {sensors.py:357} INFO - Checking if the time (17:00:00) has come
[2015-10-29 00:01:17,784] {sensors.py:357} INFO - Checking if the time (17:00:00) has come
...
[2015-10-29 16:59:17,983] {sensors.py:357} INFO - Checking if the time (17:00:00) has come
[2015-10-29 17:00:17,983] {sensors.py:357} INFO - Checking if the time (17:00:00) has come
[2015-10-29 17:00:17,984] {sensors.py:57} INFO - Success criteria met. Exiting.
Thanks in Advance.
John