created methods to call localtime