mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Next step of Perl to C++ configuration layer conversion.
This commit is contained in:
parent
337f6c5808
commit
95c284c764
15 changed files with 414 additions and 394 deletions
|
@ -237,21 +237,13 @@ std::string normalize_utf8_nfc(const char *src)
|
|||
|
||||
std::string timestamp_str()
|
||||
{
|
||||
#if 1
|
||||
std::time_t now;
|
||||
time(&now);
|
||||
char buf[sizeof "0000-00-00 00:00:00"];
|
||||
strftime(buf, sizeof(buf), "%F %T", gmtime(&now));
|
||||
#else
|
||||
const auto now = boost::posix_time::second_clock::local_time();
|
||||
const auto date = now.date();
|
||||
char buf[2048];
|
||||
sprintf(buf, "on %04d-%02d-%02d at %02d:%02d:%02d",
|
||||
SLIC3R_VERSION,
|
||||
// Local date in an ANSII format.
|
||||
int(now.date().year()), int(now.date().month()), int(now.date().day()),
|
||||
int(now.time_of_day().hours()), int(now.time_of_day().minutes()), int(now.time_of_day().seconds()));
|
||||
#endif
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue