replace gmtime by localtime