@@ -1022,7 +1022,8 @@ char *getHttpFullDate(const trantor::Date &date)
10221022{
10231023 static thread_local int64_t lastSecond = 0 ;
10241024 static thread_local char lastTimeString[128 ] = {0 };
1025- auto nowSecond = date.microSecondsSinceEpoch () / MICRO_SECONDS_PRE_SEC;
1025+ auto nowSecond =
1026+ date.microSecondsSinceEpoch () / trantor::Date::MICRO_SECONDS_PER_SEC;
10261027 if (nowSecond == lastSecond)
10271028 {
10281029 return lastTimeString;
@@ -1038,7 +1039,8 @@ void dateToCustomFormattedString(const std::string &fmtStr,
10381039 std::string &str,
10391040 const trantor::Date &date)
10401041{
1041- auto nowSecond = date.microSecondsSinceEpoch () / MICRO_SECONDS_PRE_SEC;
1042+ auto nowSecond =
1043+ date.microSecondsSinceEpoch () / trantor::Date::MICRO_SECONDS_PER_SEC;
10421044 struct tm tm_LValue = date.tmStruct ();
10431045 std::stringstream Out;
10441046 Out.imbue (std::locale{" C" });
@@ -1050,7 +1052,8 @@ const std::string &getHttpFullDateStr(const trantor::Date &date)
10501052{
10511053 static thread_local int64_t lastSecond = 0 ;
10521054 static thread_local std::string lastTimeString (128 , 0 );
1053- auto nowSecond = date.microSecondsSinceEpoch () / MICRO_SECONDS_PRE_SEC;
1055+ auto nowSecond =
1056+ date.microSecondsSinceEpoch () / trantor::Date::MICRO_SECONDS_PER_SEC;
10541057 if (nowSecond == lastSecond)
10551058 {
10561059 return lastTimeString;
@@ -1080,7 +1083,7 @@ trantor::Date getHttpDate(const std::string &httpFullDateString)
10801083 if (strptime (httpFullDateString.c_str (), format, &tmptm) != NULL )
10811084 {
10821085 auto epoch = timegm (&tmptm);
1083- return trantor::Date (epoch * MICRO_SECONDS_PRE_SEC );
1086+ return trantor::Date (epoch * trantor::Date::MICRO_SECONDS_PER_SEC );
10841087 }
10851088 }
10861089 LOG_WARN << " invalid datetime format: '" << httpFullDateString << " '" ;
0 commit comments