We consider an extension of the classical Weber problem, named as the green Weber problem (GWP), in which the customers have one-sided time windows. The GWP decides on the location of the single facility in the plane and the speeds of the vehicles serving the customers from the facility within the one-sided time windows so as to minimize the total amount of carbon dioxide emitted in the whole distribution system. We also introduce time-dependent congestion which limits the vehicle speeds in different time periods and call the resulting problem as the time-dependent green Weber problem (TD-GWP). In the TD-GWP, the vehicles are allowed to wait during more congested time periods. We formulate the GWP and TD-GWP as second order cone programming problems both of which can be efficiently solved to optimality. We show that if the traffic congestion is non-increasing, then there exists an optimal solution in which the vehicles do not wait at all. Computational results are provided comparing the locations of the facility and the resulting carbon dioxide emissions of the classical Weber problem with those of the GWP and comparing the GWP with the TD-GWP in terms of carbon dioxide emissions in different traffic congestion patterns. (C) 2017 Elsevier Ltd. All rights reserved.