diff --git a/vlib/toml/tests/burntsushi.toml-test_test.v b/vlib/toml/tests/burntsushi.toml-test_test.v index 54b3e22f4f..7dd6be207a 100644 --- a/vlib/toml/tests/burntsushi.toml-test_test.v +++ b/vlib/toml/tests/burntsushi.toml-test_test.v @@ -204,7 +204,11 @@ fn to_burntsushi(value ast.Value) string { ast.DateTime { // Normalization for json json_text := json2.Any(value.text).json_str().to_upper().replace(' ', 'T') - typ := if json_text.ends_with('Z') || json_text.all_after('T').contains('-') + + // NB: Since encoding strings in JSON now automatically includes quotes, + // I added a somewhat a workaround by adding an ending quote in order to + // recognize properly the date time type. - Ned + typ := if json_text.ends_with('Z"') || json_text.all_after('T').contains('-') || json_text.all_after('T').contains('+') { 'datetime' } else {