Implemented ec_ctime from Gisle Vanem, removed double expand_token function