Let A be a simple unital AT algebra of real rank zero such that it has a unique tracial state tau and K-1(A) is neither 0 nor Z. For each phi is an element of Hom(K-1(A), R) with dense range in R se construct a closed derivation ii in A which generates a one-parameter automorphism group alpha of A such that tau(delta(u)u*) = 2 pi i phi([u]) for any unitary u is an element of D(delta). Furthermore we construct such an alpha with the Rohlin property, which is defined in Kishimoto (Comm. Math. Phys. 179 (1996), 599-622), in this case the crossed product A x(alpha) R is a simple AT algebra of real rank zero. As an application we obtain that for such a C*-algebra A the kernel of the natural homomorphism of the group (Inn) over bar(A) of approximately inner automorphisms into Ext(K-1(A), K-0(A)) + Ext(K-0(A), K-1(A)), is the group HInn(A) of automorphisms homotopic to inner automorphisms. Combining with the result of Kishimoto and Kumjian (Trans. Amer. Math. Sec., to appear), (Inn) over bar(A)/HInn(A) is isomorphic to the above direct sum. As another application of the construction of derivations, we show that if A is a C*-algebra of the above type and alpha is an element of HInn(A) has the Rohlin property and comes from phi is an element of Hom(K-1(A), R) with dense range as in Kishimoto and Kumjian (preprint), then the crossed product A x(alpha) Z is again of the same type; in particular A x(alpha) Z is an AT algebra. (The other properties are known from Kishimoto [J. Operator Theory 40 (1998)].) (C) 1998 Academic Press.