In recent years, marine container terminal gate congestion has become a serious issue, because it not only limits the efficiency of the logistics system but also generates serious air pollution. The direct reason has been recognized to be the unmanaged container truck arrivals. One of the possible solutions is that the terminal operator provides vessel-dependent time windows for the truck entries, which has already been used in many Chinese seaports. Previously, the authors proposed the idea of time window optimization and analyzed its economic feasibility in the context of the export direction gate operation. This paper, as a following study, addresses the practical application of this solution. First, a framework is developed for the application of time window optimization in container terminals. Based on the framework, the optimization model is modified with more practical constraints and the heuristic of genetic algorithm is improved to be more efficient. Then two optimization strategies are proposed namely fixed end-point time window (FEP) and variable end-point time window (VEP). To compare the effectiveness of two strategies, the optimization model and the heuristic are applied to some tests, including a real data test and a scenarios test. The result indicates that good coordination is necessary for assigning time windows, where FEP strategy performs better than VEP strategy because it can achieve almost the same effect with only half of the calculation effort. During the tests, some practical problems are also discussed, such as vessel delays and yard capacity.