Good day!
The time in Flink is different from the time in the real world. In flink, the time is divided into event time, ingestion time, and processing time.
If the time window is defined based on the EventTime, the EventTimeWindow is formed. In this case, the message itself should carry the EventTime.
If the time window is defined based on the IngesingtTime, the IngestingTimeWindow is formed and the systemTime of the source is used.
If the time window is defined based on the ProcessingTime benchmark, the ProcessingTimeWindow is formed and the systemTime of the operator is used.