changed time to localtime