Skip to content

Instantly share code, notes, and snippets.

View jiapengwen's full-sized avatar
🎯
Learning

文佳鹏 jiapengwen

🎯
Learning
  • 浙江杭州
View GitHub Profile
@jiapengwen
jiapengwen / time_utils.h
Last active April 3, 2020 02:13
c++ time utils
//*****************************************************
// ConvertYYYYMMDDhhmmss_us
//*****************************************************
static std::string ConvertYYYYMMDDhhmmss_us(uint64_t intime,
bool usegmtime = false)
{
char buff[50];
memset(buff, '\0', sizeof(buff));
std::string s_format = "%4d%02d%02d-%02d:%02d:%02d.%06d";