Implemented localtime and globaltime