diff --git a/include/crow/http_server.h b/include/crow/http_server.h index 548ea7a30..dbcd38382 100644 --- a/include/crow/http_server.h +++ b/include/crow/http_server.h @@ -83,9 +83,9 @@ namespace crow tm my_tm; #if defined(_MSC_VER) or defined(__MINGW32__) - gmtime_s(&my_tm, &last_time_t); + localtime_s(&my_tm, &last_time_t); #else - gmtime_r(&last_time_t, &my_tm); + localtime_r(&last_time_t, &my_tm); #endif date_str.resize(100); size_t date_str_sz = strftime(&date_str[0], 99, "%a, %d %b %Y %H:%M:%S GMT", &my_tm); diff --git a/include/crow/logging.h b/include/crow/logging.h index db8f72f93..36f170363 100644 --- a/include/crow/logging.h +++ b/include/crow/logging.h @@ -52,9 +52,9 @@ namespace crow tm my_tm; #if defined(_MSC_VER) or defined(__MINGW32__) - gmtime_s(&my_tm, &t); + localtime_s(&my_tm, &t); #else - gmtime_r(&t, &my_tm); + localtime_r(&t, &my_tm); #endif size_t sz = strftime(date, sizeof(date), "%Y-%m-%d %H:%M:%S", &my_tm);