feat(Core/Common): add new helpers for time utility (#10207)

This commit is contained in:
Kargatum
2022-01-19 12:01:59 +07:00
committed by GitHub
parent b5ab409614
commit 259b9133f6
60 changed files with 732 additions and 341 deletions

View File

@@ -68,19 +68,12 @@ private:
StorageType m_storage;
};
struct tm* localtime_r(time_t const* time, struct tm* result);
time_t LocalTimeToUTCTime(time_t time);
time_t GetLocalHourTimestamp(time_t time, uint8 hour, bool onlyAfterTime = true);
tm TimeBreakdown(time_t t);
void stripLineInvisibleChars(std::string& src);
AC_COMMON_API Optional<int32> MoneyStringToMoney(std::string_view moneyString);
std::string secsToTimeString(uint64 timeInSecs, bool shortText = false);
uint32 TimeStringToSecs(const std::string& timestring);
std::string TimeToTimestampStr(time_t t);
std::string TimeToHumanReadable(time_t t);
inline void ApplyPercentModFloatVar(float& var, float val, bool apply)
{