Added option to use localtime everywhere gmtime was used