diff --git a/boards/default_src/micropython/blocks/sensor_onboard.js b/boards/default_src/micropython/blocks/sensor_onboard.js
index 40b78759..53dcec9d 100644
--- a/boards/default_src/micropython/blocks/sensor_onboard.js
+++ b/boards/default_src/micropython/blocks/sensor_onboard.js
@@ -612,6 +612,20 @@ export const onboard_RTC_get_time_str = {
}
};
+export const onboard_RTC_get_timetuple_to_str = {
+ init: function () {
+ this.setColour(SENSOR_ONBOARD_HUE);
+ this.appendValueInput('CONTENT')
+ .appendField('RTC '+Blockly.Msg.blockpy_USE_TUPLE)
+ .setCheck()
+ this.appendDummyInput()
+ .appendField( Blockly.Msg.MATH_ZHW + Blockly.Msg.MIXLY_GPS_TIME+Blockly.Msg.LANG_MATH_STRING)
+ this.setOutput(true, String);
+ this.setInputsInline(true);
+ this.setTooltip(Blockly.Msg.MIXLY_ESP32_RTC_GET_TIME_TOOLTIP);
+ }
+};
+
export const sensor_LTR308 = {
init: function () {
this.setColour(SENSOR_ONBOARD_HUE);
diff --git a/boards/default_src/micropython/generators/sensor_onboard.js b/boards/default_src/micropython/generators/sensor_onboard.js
index 500a2d1f..ae9790f6 100644
--- a/boards/default_src/micropython/generators/sensor_onboard.js
+++ b/boards/default_src/micropython/generators/sensor_onboard.js
@@ -584,6 +584,13 @@ export const onboard_RTC_get_time_str = function(_,generator){
return [code, generator.ORDER_ATOMIC];
}
+export const onboard_RTC_get_timetuple_to_str = function(_,generator){
+ generator.definitions_['import_rtctime'] = 'import rtctime';
+ var ct = generator.valueToCode(this, 'CONTENT', generator.ORDER_ATOMIC);
+ var code = 'rtctime.strtime(('+ ct +'))';
+ return [code, generator.ORDER_ATOMIC];
+}
+
//mixgo_cc onboard_sensor generators:
export const sensor_mixgo_cc_mmc5603_get_magnetic = function (_, generator) {
diff --git a/boards/default_src/micropython_educore/template.xml b/boards/default_src/micropython_educore/template.xml
index cdb0014a..260dc1e4 100644
--- a/boards/default_src/micropython_educore/template.xml
+++ b/boards/default_src/micropython_educore/template.xml
@@ -1587,6 +1587,13 @@
+
+
+
+ 2023,1,1,12,0,0
+
+
+
diff --git a/boards/default_src/micropython_esp32/template.xml b/boards/default_src/micropython_esp32/template.xml
index bc9a0947..4c196a1e 100644
--- a/boards/default_src/micropython_esp32/template.xml
+++ b/boards/default_src/micropython_esp32/template.xml
@@ -1491,6 +1491,13 @@
+
+
+
+ 2023,1,1,12,0,0
+
+
+
diff --git a/boards/default_src/micropython_esp32c2/template.xml b/boards/default_src/micropython_esp32c2/template.xml
index e133d9be..77dba2b0 100644
--- a/boards/default_src/micropython_esp32c2/template.xml
+++ b/boards/default_src/micropython_esp32c2/template.xml
@@ -1510,6 +1510,13 @@
+
+
+
+ 2023,1,1,12,0,0
+
+
+
diff --git a/boards/default_src/micropython_esp32c3/template.xml b/boards/default_src/micropython_esp32c3/template.xml
index 3bc72b4c..a59519bd 100644
--- a/boards/default_src/micropython_esp32c3/template.xml
+++ b/boards/default_src/micropython_esp32c3/template.xml
@@ -1500,6 +1500,13 @@
+
+
+
+ 2023,1,1,12,0,0
+
+
+
diff --git a/boards/default_src/micropython_esp32s2/template.xml b/boards/default_src/micropython_esp32s2/template.xml
index b4aec6eb..33f8b368 100644
--- a/boards/default_src/micropython_esp32s2/template.xml
+++ b/boards/default_src/micropython_esp32s2/template.xml
@@ -1466,6 +1466,13 @@
+
+
+
+ 2023,1,1,12,0,0
+
+
+
diff --git a/boards/default_src/micropython_esp32s3/template.xml b/boards/default_src/micropython_esp32s3/template.xml
index 10c4ebe8..da023b8b 100644
--- a/boards/default_src/micropython_esp32s3/template.xml
+++ b/boards/default_src/micropython_esp32s3/template.xml
@@ -1520,6 +1520,13 @@
+
+
+
+ 2023,1,1,12,0,0
+
+
+