This paper is an attempt to cast both uncertainty and time in a logical framework. It generalizes possibilistic logic, previously developed by the authors, where each classical formula is associated with a weight which obeys the laws of possibility theory. In the possibilistic temporal logic we present here, each formula is associated with a time set (a fuzzy set in the more general case) which represents the set of instants where the formula is certainly true (more or less certainly true in the general case). When a particular instant is fixed we recover possibilistic logic. Timed possibilistic logic generalizes possibilistic logic also in the sense that we substitute the lattice structure of the set of the (fuzzy) subsets of the temporal scale to the lattice structure underlying the certainty weights in possibilistic logic. Thus many results from possibilistic logic can be straightforwardly generalized to timed possibilistic logic. Illustrative examples are given.