diff --git a/buildinc.vcxproj.filters b/buildinc.vcxproj.filters
index 9ea529a..c701ec1 100644
--- a/buildinc.vcxproj.filters
+++ b/buildinc.vcxproj.filters
@@ -22,10 +22,10 @@
Header Files
-
+
Source Files
-
+
Source Files
diff --git a/src/buildnumber.h b/src/buildnumber.h
index 49367e1..990ad8d 100644
--- a/src/buildnumber.h
+++ b/src/buildnumber.h
@@ -1,5 +1,5 @@
-// AUTOMATICALLY GENERATED BY BUILDINC v0.1.88 TOOL
-// LAST BUILD: 2022-01-24 15:11:15
+// AUTOMATICALLY GENERATED BY BUILDINC v0.1.98 TOOL
+// LAST BUILD: 2022-04-24 20:47:29
#pragma once
@@ -15,15 +15,15 @@ namespace BuildIncVersion
constexpr uint32_t minor = 1;
// Do not modify these
- constexpr uint32_t build = 88;
+ constexpr uint32_t build = 99;
constexpr uint32_t version = major * 1000 + minor * 100 + build;
- constexpr uint64_t random_seed = 0x1c7f372cae5b19e2;
+ constexpr uint64_t random_seed = 0x1420fe4586eca80c;
- constexpr char version_string[] = "v0.1.88";
- constexpr char build_time_string[] = "2022-01-24 15:11:15";
- constexpr char phrase[] = "untwist-shock-politely";
- constexpr char calver[] = "2022.04.88";
+ constexpr char version_string[] = "v0.1.99";
+ constexpr char build_time_string[] = "2022-04-24 20:47:29";
+ constexpr char phrase[] = "battery-willpower-donut";
+ constexpr char calver[] = "2022.16.99";
// Copy paste to import to your project
/*
@@ -36,7 +36,7 @@ namespace BuildIncVersion
constexpr auto version_string = BuildIncVersion::version_string;
constexpr auto build_time_string = BuildIncVersion::build_time_string;
constexpr auto phrase = BuildIncVersion::phrase;
- constexpr auto phrase = BuildIncVersion::calver;
+ constexpr auto calver = BuildIncVersion::calver;
*/
}
#endif // BUILDINCVERSION_BUILDNUMBER_HEADER_H
diff --git a/src/main.cpp b/src/main.cpp
index 577460e..b10e4eb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -116,34 +116,21 @@ static std::string ToUpper(const std::string &s)
return ret;
}
+
std::string GetDateString()
{
- std::stringstream buffer;
- auto now = std::chrono::system_clock::now();
- auto in_time_t = std::chrono::system_clock::to_time_t(now);
-
- tm nt;
- localtime_s(&nt, &in_time_t);
-
- buffer << std::put_time(&nt, "%F %T");
- return buffer.str();
+ auto const time = std::chrono::current_zone()->to_local(std::chrono::system_clock::now());
+ return std::format("{:%Y-%m-%d %X}", time);
}
std::string cal_version_string(uint32_t build)
{
- std::stringstream buffer;
- auto now = std::chrono::system_clock::now();
- auto in_time_t = std::chrono::system_clock::to_time_t(now);
-
- tm nt;
- localtime_s(&nt, &in_time_t);
-
- buffer << std::put_time(&nt, "%Y.%V");
- return std::format("{}.{}", buffer.str(), build);
+ auto const time = std::chrono::current_zone()->to_local(std::chrono::system_clock::now());
+ return std::format("{:%Y.%V}.{}", time, build);
}
void WriteHeader(std::filesystem::path &HeaderFile,
- const std::string & project_namespace,
+ const std::string &project_namespace,
uint32_t major,
uint32_t minor,
uint32_t build)
@@ -199,7 +186,6 @@ void WriteHeader(std::filesystem::path &HeaderFile,
generated.append(std::format("\t\tconstexpr char calver[] = \"{}\";\n", cal_version_string(build)));
-
generated.append("\n");
generated.append("\t\t// Copy paste to import to your project\n");
@@ -218,8 +204,6 @@ void WriteHeader(std::filesystem::path &HeaderFile,
generated.append(std::format("\t\t\tconstexpr auto calver = {}::calver;\n", modns));
-
-
generated.append("\t\t*/\n");