From 33f8832f087da0fa1f03a900c7d7b9b0b59289f1 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Mon, 30 Mar 2026 06:34:09 +1100 Subject: [PATCH 01/18] Start fixing date/time formatting in pattern data --- lib/include/pl/pattern_language.hpp | 12 ++ lib/include/pl/patterns/pattern_unsigned.hpp | 110 +++++++++---------- lib/source/pl/lib/std/time.cpp | 32 +++--- lib/source/pl/pattern_language.cpp | 8 ++ 4 files changed, 93 insertions(+), 69 deletions(-) diff --git a/lib/include/pl/pattern_language.hpp b/lib/include/pl/pattern_language.hpp index 2cffb219..0e5e1027 100644 --- a/lib/include/pl/pattern_language.hpp +++ b/lib/include/pl/pattern_language.hpp @@ -23,6 +23,7 @@ #include #include +#include namespace pl { @@ -134,6 +135,16 @@ namespace pl { */ void abort(); + /** + * @brief Get locale (currently only used for date/time formatting) + */ + const wolv::util::Locale& getLocale() const; + + /** + * @brief Set locale (currently only used for date/time formatting) + */ + void setLocale(const wolv::util::Locale &lc); + /** * @brief Sets the data source for the pattern language * @param baseAddress Base address of the data source @@ -416,6 +427,7 @@ namespace pl { private: Internals m_internals; + wolv::util::Locale m_locale; std::vector m_compileErrors; std::optional m_currError; std::map m_defines; diff --git a/lib/include/pl/patterns/pattern_unsigned.hpp b/lib/include/pl/patterns/pattern_unsigned.hpp index 6cb650de..88e02d7a 100644 --- a/lib/include/pl/patterns/pattern_unsigned.hpp +++ b/lib/include/pl/patterns/pattern_unsigned.hpp @@ -1,56 +1,56 @@ -#pragma once - -#include - -namespace pl::ptrn { - - class PatternUnsigned : public Pattern { - public: - PatternUnsigned(core::Evaluator *evaluator, u64 offset, size_t size, u32 line) - : Pattern(evaluator, offset, size, line) { } - - [[nodiscard]] std::shared_ptr clone() const override { - return std::unique_ptr(new PatternUnsigned(*this)); - } - - [[nodiscard]] core::Token::Literal getValue() const override { - u128 data = 0; - this->getEvaluator()->readData(this->getOffset(), &data, this->getSize(), this->getSection()); - return transformValue(hlp::changeEndianess(data, this->getSize(), this->getEndian())); - } - - [[nodiscard]] std::string getFormattedName() const override { - return this->getTypeName(); - } - - [[nodiscard]] bool operator==(const Pattern &other) const override { return compareCommonProperties(other); } - - void accept(PatternVisitor &v) override { - v.visit(*this); - } - - std::string formatDisplayValue() override { - auto data = this->getValue().toUnsigned(); - return Pattern::callUserFormatFunc(this->getValue()).value_or(fmt::format("{:d}", data)); - } - - [[nodiscard]] std::string toString() override { - auto value = this->getValue(); - auto result = fmt::format("{:d}", value.toUnsigned()); - - return Pattern::callUserFormatFunc(value, true).value_or(result); - } - - std::vector getRawBytes() override { - std::vector result; - result.resize(this->getSize()); - - this->getEvaluator()->readData(this->getOffset(), result.data(), result.size(), this->getSection()); - if (this->getEndian() != std::endian::native) - std::reverse(result.begin(), result.end()); - - return result; - } - }; - +#pragma once + +#include + +namespace pl::ptrn { + + class PatternUnsigned : public Pattern { + public: + PatternUnsigned(core::Evaluator *evaluator, u64 offset, size_t size, u32 line) + : Pattern(evaluator, offset, size, line) { } + + [[nodiscard]] std::shared_ptr clone() const override { + return std::unique_ptr(new PatternUnsigned(*this)); + } + + [[nodiscard]] core::Token::Literal getValue() const override { + u128 data = 0; + this->getEvaluator()->readData(this->getOffset(), &data, this->getSize(), this->getSection()); + return transformValue(hlp::changeEndianess(data, this->getSize(), this->getEndian())); + } + + [[nodiscard]] std::string getFormattedName() const override { + return this->getTypeName(); + } + + [[nodiscard]] bool operator==(const Pattern &other) const override { return compareCommonProperties(other); } + + void accept(PatternVisitor &v) override { + v.visit(*this); + } + + std::string formatDisplayValue() override { + auto data = this->getValue().toUnsigned(); + return Pattern::callUserFormatFunc(this->getValue()).value_or(fmt::format("{:d}", data)); + } + + [[nodiscard]] std::string toString() override { + auto value = this->getValue(); + auto result = fmt::format("{:d}", value.toUnsigned()); + + return Pattern::callUserFormatFunc(value, true).value_or(result); + } + + std::vector getRawBytes() override { + std::vector result; + result.resize(this->getSize()); + + this->getEvaluator()->readData(this->getOffset(), result.data(), result.size(), this->getSection()); + if (this->getEndian() != std::endian::native) + std::reverse(result.begin(), result.end()); + + return result; + } + }; + } \ No newline at end of file diff --git a/lib/source/pl/lib/std/time.cpp b/lib/source/pl/lib/std/time.cpp index 11a05b70..b5e69f1d 100644 --- a/lib/source/pl/lib/std/time.cpp +++ b/lib/source/pl/lib/std/time.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include @@ -65,29 +66,21 @@ namespace pl::lib::libstd::time { /* to_local(time) */ runtime.addFunction(nsStdTime, "to_local", FunctionParameterCount::exactly(1), [&runtime](Evaluator *, auto params) -> std::optional { auto time = time_t(params[0].toUnsigned()); + auto localTime = std::localtime(&time); - try { - auto localTime = std::localtime(&time); - if (localTime == nullptr) return u128(0); + if (localTime == nullptr) return u128(0); - return { packTMValue(*localTime, runtime) }; - } catch (const fmt::format_error&) { - return u128(0); - } + return { packTMValue(*localTime, runtime) }; }); /* to_utc(time) */ runtime.addFunction(nsStdTime, "to_utc", FunctionParameterCount::exactly(1), [&runtime](Evaluator *, auto params) -> std::optional { auto time = time_t(params[0].toUnsigned()); + auto gmTime = std::gmtime(&time); - try { - auto gmTime = std::gmtime(&time); - if (gmTime == nullptr) return u128(0); + if (gmTime == nullptr) return u128(0); - return { packTMValue(*gmTime, runtime) }; - } catch (const fmt::format_error&) { - return u128(0); - } + return { packTMValue(*gmTime, runtime) }; }); /* to_epoch(structured_time) */ @@ -117,6 +110,17 @@ namespace pl::lib::libstd::time { return { fmt::format(fmt::runtime(fmt::format("{{:{}}}", formatString)), time) }; }); + + /* format_tt_locale(time_t) */ + runtime.addFunction(nsStdTime, "format_tt_locale", FunctionParameterCount::exactly(1), [&runtime](Evaluator *, auto params) -> std::optional { + auto tt = params[0].toUnsigned(); + const wolv::util::Locale &lc = runtime.getLocale(); + + using wolv::util::DTOpts; + auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT32 | DTOpts::DandT | DTOpts::LongDate); + + return optval; + }); } } diff --git a/lib/source/pl/pattern_language.cpp b/lib/source/pl/pattern_language.cpp index 54c4e24c..2a2116de 100644 --- a/lib/source/pl/pattern_language.cpp +++ b/lib/source/pl/pattern_language.cpp @@ -380,6 +380,14 @@ namespace pl { this->m_aborted = true; } + const wolv::util::Locale& PatternLanguage::getLocale() const { + return m_locale; + } + + void PatternLanguage::setLocale(const wolv::util::Locale &lc) { + m_locale = lc; + } + void PatternLanguage::setIncludePaths(const std::vector& paths) { this->m_fileResolver.setIncludePaths(paths); } From 3e05889dc1d80c7934c14c03bc3e80045aeaba0c Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Tue, 31 Mar 2026 02:29:35 +1100 Subject: [PATCH 02/18] Update libwolv --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index 1063613e..5be84628 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit 1063613e87100910dfae254ae9af0111203c768b +Subproject commit 5be84628dc4d7da6281c943888497f8b886b7f5a From f6f4dbd7b2b2b6fb6f9197d3455742ed463b7d26 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Tue, 31 Mar 2026 02:37:57 +1100 Subject: [PATCH 03/18] Line endings --- lib/include/pl/patterns/pattern_unsigned.hpp | 110 +++++++++---------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/lib/include/pl/patterns/pattern_unsigned.hpp b/lib/include/pl/patterns/pattern_unsigned.hpp index 88e02d7a..6cb650de 100644 --- a/lib/include/pl/patterns/pattern_unsigned.hpp +++ b/lib/include/pl/patterns/pattern_unsigned.hpp @@ -1,56 +1,56 @@ -#pragma once - -#include - -namespace pl::ptrn { - - class PatternUnsigned : public Pattern { - public: - PatternUnsigned(core::Evaluator *evaluator, u64 offset, size_t size, u32 line) - : Pattern(evaluator, offset, size, line) { } - - [[nodiscard]] std::shared_ptr clone() const override { - return std::unique_ptr(new PatternUnsigned(*this)); - } - - [[nodiscard]] core::Token::Literal getValue() const override { - u128 data = 0; - this->getEvaluator()->readData(this->getOffset(), &data, this->getSize(), this->getSection()); - return transformValue(hlp::changeEndianess(data, this->getSize(), this->getEndian())); - } - - [[nodiscard]] std::string getFormattedName() const override { - return this->getTypeName(); - } - - [[nodiscard]] bool operator==(const Pattern &other) const override { return compareCommonProperties(other); } - - void accept(PatternVisitor &v) override { - v.visit(*this); - } - - std::string formatDisplayValue() override { - auto data = this->getValue().toUnsigned(); - return Pattern::callUserFormatFunc(this->getValue()).value_or(fmt::format("{:d}", data)); - } - - [[nodiscard]] std::string toString() override { - auto value = this->getValue(); - auto result = fmt::format("{:d}", value.toUnsigned()); - - return Pattern::callUserFormatFunc(value, true).value_or(result); - } - - std::vector getRawBytes() override { - std::vector result; - result.resize(this->getSize()); - - this->getEvaluator()->readData(this->getOffset(), result.data(), result.size(), this->getSection()); - if (this->getEndian() != std::endian::native) - std::reverse(result.begin(), result.end()); - - return result; - } - }; - +#pragma once + +#include + +namespace pl::ptrn { + + class PatternUnsigned : public Pattern { + public: + PatternUnsigned(core::Evaluator *evaluator, u64 offset, size_t size, u32 line) + : Pattern(evaluator, offset, size, line) { } + + [[nodiscard]] std::shared_ptr clone() const override { + return std::unique_ptr(new PatternUnsigned(*this)); + } + + [[nodiscard]] core::Token::Literal getValue() const override { + u128 data = 0; + this->getEvaluator()->readData(this->getOffset(), &data, this->getSize(), this->getSection()); + return transformValue(hlp::changeEndianess(data, this->getSize(), this->getEndian())); + } + + [[nodiscard]] std::string getFormattedName() const override { + return this->getTypeName(); + } + + [[nodiscard]] bool operator==(const Pattern &other) const override { return compareCommonProperties(other); } + + void accept(PatternVisitor &v) override { + v.visit(*this); + } + + std::string formatDisplayValue() override { + auto data = this->getValue().toUnsigned(); + return Pattern::callUserFormatFunc(this->getValue()).value_or(fmt::format("{:d}", data)); + } + + [[nodiscard]] std::string toString() override { + auto value = this->getValue(); + auto result = fmt::format("{:d}", value.toUnsigned()); + + return Pattern::callUserFormatFunc(value, true).value_or(result); + } + + std::vector getRawBytes() override { + std::vector result; + result.resize(this->getSize()); + + this->getEvaluator()->readData(this->getOffset(), result.data(), result.size(), this->getSection()); + if (this->getEndian() != std::endian::native) + std::reverse(result.begin(), result.end()); + + return result; + } + }; + } \ No newline at end of file From f72db06ecd3beae70390c6977136195025a7eb16 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Thu, 2 Apr 2026 01:48:53 +1100 Subject: [PATCH 04/18] Rename function --- lib/source/pl/lib/std/time.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/source/pl/lib/std/time.cpp b/lib/source/pl/lib/std/time.cpp index b5e69f1d..fd551a38 100644 --- a/lib/source/pl/lib/std/time.cpp +++ b/lib/source/pl/lib/std/time.cpp @@ -12,6 +12,8 @@ namespace pl::lib::libstd::time { + const std::string s_canNotFormat = "Can not format"; + static u128 packTMValue(const std::tm &tm, pl::PatternLanguage &runtime) { auto endian = runtime.getInternals().evaluator->getDefaultEndian(); std::tm tmCopy = tm; @@ -112,12 +114,15 @@ namespace pl::lib::libstd::time { }); /* format_tt_locale(time_t) */ - runtime.addFunction(nsStdTime, "format_tt_locale", FunctionParameterCount::exactly(1), [&runtime](Evaluator *, auto params) -> std::optional { + runtime.addFunction(nsStdTime, "format_tt", FunctionParameterCount::exactly(1), [&runtime](Evaluator *, auto params) -> std::optional { auto tt = params[0].toUnsigned(); const wolv::util::Locale &lc = runtime.getLocale(); using wolv::util::DTOpts; - auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT32 | DTOpts::DandT | DTOpts::LongDate); + auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT64 | DTOpts::DandT | DTOpts::LongDate); + if (!optval) { + return s_canNotFormat; + } return optval; }); From d89b56bf4fd0a15f76c747aee637575798935c79 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Thu, 2 Apr 2026 02:19:18 +1100 Subject: [PATCH 05/18] Update libwolv --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index 5be84628..f004cbe6 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit 5be84628dc4d7da6281c943888497f8b886b7f5a +Subproject commit f004cbe696cca21a820903a3538dde043484e9bf From e2918ade9b3b104976037737d070d5d7968a9d99 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Thu, 2 Apr 2026 14:47:57 +1100 Subject: [PATCH 06/18] Update libwolv --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index f004cbe6..8e14d12b 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit f004cbe696cca21a820903a3538dde043484e9bf +Subproject commit 8e14d12b09eb7de82b510033b20f10a3e861c0d5 From 95a3af36bba99deb68a8bf4bbd1355c89c069ce7 Mon Sep 17 00:00:00 2001 From: Stephen Hewitt Date: Thu, 2 Apr 2026 19:58:44 +1100 Subject: [PATCH 07/18] Update libwolv --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index 8e14d12b..b219f935 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit 8e14d12b09eb7de82b510033b20f10a3e861c0d5 +Subproject commit b219f9357a657962f92fc63bc2e162d057cc24db From 30c68b050f68c69c18fb0ea86a4d4c532a914437 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Fri, 3 Apr 2026 02:23:07 +1100 Subject: [PATCH 08/18] DOS date & time --- lib/source/pl/lib/std/time.cpp | 77 +++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) diff --git a/lib/source/pl/lib/std/time.cpp b/lib/source/pl/lib/std/time.cpp index fd551a38..c6b630a1 100644 --- a/lib/source/pl/lib/std/time.cpp +++ b/lib/source/pl/lib/std/time.cpp @@ -12,6 +12,7 @@ namespace pl::lib::libstd::time { + const std::string s_invalid = "Invalid"; const std::string s_canNotFormat = "Can not format"; static u128 packTMValue(const std::tm &tm, pl::PatternLanguage &runtime) { @@ -113,7 +114,7 @@ namespace pl::lib::libstd::time { return { fmt::format(fmt::runtime(fmt::format("{{:{}}}", formatString)), time) }; }); - /* format_tt_locale(time_t) */ + /* format_tt(time_t) */ runtime.addFunction(nsStdTime, "format_tt", FunctionParameterCount::exactly(1), [&runtime](Evaluator *, auto params) -> std::optional { auto tt = params[0].toUnsigned(); const wolv::util::Locale &lc = runtime.getLocale(); @@ -126,6 +127,80 @@ namespace pl::lib::libstd::time { return optval; }); + + /* format_dos_date(time_t) */ + runtime.addFunction(nsStdTime, "format_dos_date", FunctionParameterCount::exactly(1), [&runtime](Evaluator *, auto params) -> std::optional { + auto p = params[0].toUnsigned(); + + struct DOSDate { + unsigned day : 5; + unsigned month : 4; + unsigned year : 7; + }; + + DOSDate dd; + std::memcpy(&dd, &p, sizeof(dd)); + if ( (dd.day<1 || dd.day>31) || (dd.month<1 || dd.month>12) ) { + return s_invalid; + } + + std::tm tm{}; + tm.tm_year = dd.year + 80; + tm.tm_mon = dd.month - 1; + tm.tm_mday = dd.day; + +#if defined(OS_WINDOWS) + time_t tt = _mkgmtime(&tm); +#else + time_t tt = timegm(&tm); +#endif + if (tt == -1) { + return s_canNotFormat; + } + + const wolv::util::Locale &lc = runtime.getLocale(); + + using wolv::util::DTOpts; + auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT64 | DTOpts::D | DTOpts::LongDate); + if (!optval) { + return s_canNotFormat; + } + + return *optval; + }); + + /* format_dos_time(time_t) */ + runtime.addFunction(nsStdTime, "format_dos_time", FunctionParameterCount::exactly(1), [&runtime](Evaluator *, auto params) -> std::optional { + auto p = params[0].toUnsigned(); + + struct DOSTime { + unsigned seconds : 5; + unsigned minutes : 6; + unsigned hours : 5; + }; + + DOSTime dt; + std::memcpy(&dt, &p, sizeof(dt)); + + if ( (dt.hours<0 || dt.hours>23) || + (dt.minutes<0 || dt.minutes>59) || + (dt.seconds<0 && dt.seconds>29) ) + { + return s_invalid; + } + + time_t tt = dt.hours*60*60 + dt.minutes*60 + dt.seconds*2; + + const wolv::util::Locale &lc = runtime.getLocale(); + + using wolv::util::DTOpts; + auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT64 | DTOpts::T); + if (!optval) { + return s_canNotFormat; + } + + return *optval; + }); } } From e021f9af10f9888388ff4ed5ec399a5a06b0d0f0 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Fri, 3 Apr 2026 02:25:54 +1100 Subject: [PATCH 09/18] DOS date & time --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index b219f935..42c3abdb 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit b219f9357a657962f92fc63bc2e162d057cc24db +Subproject commit 42c3abdb04a3912f79587db36553e430263da6a6 From bca549f0f9bbbe44367dda4baacba96369b16438 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Fri, 3 Apr 2026 16:31:21 +1100 Subject: [PATCH 10/18] Fixed existing endian bug in DOS d&t --- lib/source/pl/lib/std/time.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/source/pl/lib/std/time.cpp b/lib/source/pl/lib/std/time.cpp index c6b630a1..5b88d0a9 100644 --- a/lib/source/pl/lib/std/time.cpp +++ b/lib/source/pl/lib/std/time.cpp @@ -133,9 +133,9 @@ namespace pl::lib::libstd::time { auto p = params[0].toUnsigned(); struct DOSDate { - unsigned day : 5; - unsigned month : 4; - unsigned year : 7; + u16 day : 5; + u16 month : 4; + u16 year : 7; }; DOSDate dd; @@ -174,9 +174,9 @@ namespace pl::lib::libstd::time { auto p = params[0].toUnsigned(); struct DOSTime { - unsigned seconds : 5; - unsigned minutes : 6; - unsigned hours : 5; + u16 seconds : 5; + u16 minutes : 6; + u16 hours : 5; }; DOSTime dt; From e3df2ab009cb2a38fbddec604fd1e87e5f53ef81 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Fri, 3 Apr 2026 19:51:36 +1100 Subject: [PATCH 11/18] Update libwolv --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index 42c3abdb..42b0a5ad 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit 42c3abdb04a3912f79587db36553e430263da6a6 +Subproject commit 42b0a5ade22c2533737774a96637563e6f0f4dcd From 27ebd1f2d5e15132402f955d69049c410ad2e14b Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Fri, 3 Apr 2026 20:14:33 +1100 Subject: [PATCH 12/18] Try to fix more mac build errors --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index 42b0a5ad..f3196c1c 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit 42b0a5ade22c2533737774a96637563e6f0f4dcd +Subproject commit f3196c1c51f9a66d1d63631aae5400beb70b49e0 From d18a132f575dab48c8123e0719fec56ef6b61b53 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Fri, 3 Apr 2026 20:20:59 +1100 Subject: [PATCH 13/18] Try to fix more mac build errors --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index f3196c1c..d4c4b972 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit f3196c1c51f9a66d1d63631aae5400beb70b49e0 +Subproject commit d4c4b97207f3132d708e93377759c1553b5dcfc3 From f417d684e31127a45901b4e6e63bca69acffee44 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Fri, 3 Apr 2026 20:26:10 +1100 Subject: [PATCH 14/18] Try to fix more mac build errors --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index d4c4b972..3d3278d6 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit d4c4b97207f3132d708e93377759c1553b5dcfc3 +Subproject commit 3d3278d65574bae3c8bdc1a2c6bc73d84adeb284 From 3ca48123582c6137151be4f5ba4696d85b2be74d Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Fri, 3 Apr 2026 20:35:10 +1100 Subject: [PATCH 15/18] Fix validation error --- lib/source/pl/lib/std/time.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/source/pl/lib/std/time.cpp b/lib/source/pl/lib/std/time.cpp index 5b88d0a9..87665051 100644 --- a/lib/source/pl/lib/std/time.cpp +++ b/lib/source/pl/lib/std/time.cpp @@ -184,7 +184,7 @@ namespace pl::lib::libstd::time { if ( (dt.hours<0 || dt.hours>23) || (dt.minutes<0 || dt.minutes>59) || - (dt.seconds<0 && dt.seconds>29) ) + (dt.seconds<0 || dt.seconds>29) ) { return s_invalid; } From 79ecee1a7d230f84b9244db88598c786b5ed74e0 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Sun, 5 Apr 2026 20:17:32 +1000 Subject: [PATCH 16/18] Misc --- lib/source/pl/lib/std/time.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/source/pl/lib/std/time.cpp b/lib/source/pl/lib/std/time.cpp index 87665051..559553c4 100644 --- a/lib/source/pl/lib/std/time.cpp +++ b/lib/source/pl/lib/std/time.cpp @@ -120,7 +120,7 @@ namespace pl::lib::libstd::time { const wolv::util::Locale &lc = runtime.getLocale(); using wolv::util::DTOpts; - auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT64 | DTOpts::DandT | DTOpts::LongDate); + auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT64 | DTOpts::DandT); if (!optval) { return s_canNotFormat; } @@ -161,7 +161,7 @@ namespace pl::lib::libstd::time { const wolv::util::Locale &lc = runtime.getLocale(); using wolv::util::DTOpts; - auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT64 | DTOpts::D | DTOpts::LongDate); + auto optval = wolv::util::formatTT(lc, tt, DTOpts::TT64 | DTOpts::D); if (!optval) { return s_canNotFormat; } From eadb17038c88c0603f7b77f7c5d520911b338eb1 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Tue, 7 Apr 2026 23:47:22 +1000 Subject: [PATCH 17/18] DTfmt: update libwolv --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index 3d3278d6..5024eb77 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit 3d3278d65574bae3c8bdc1a2c6bc73d84adeb284 +Subproject commit 5024eb773a8db339aef9ef47653477d6a0a55d1d From 606d1eddaa332a52f6e8c44f95379918ea9f29f5 Mon Sep 17 00:00:00 2001 From: "shewitt.au" Date: Wed, 8 Apr 2026 00:24:20 +1000 Subject: [PATCH 18/18] DTfmt: update libwolv --- external/libwolv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/libwolv b/external/libwolv index 5024eb77..25907ccf 160000 --- a/external/libwolv +++ b/external/libwolv @@ -1 +1 @@ -Subproject commit 5024eb773a8db339aef9ef47653477d6a0a55d1d +Subproject commit 25907ccf6459658b1f610eec0aaee155730d1459