define to set localtime