File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,14 @@ class RTCTime {
114
114
* @return String The date and time in the format YYYY-MM-DDTHH:MM:SS.
115
115
*/
116
116
arduino::String toString () const ;
117
+
118
+ /* *
119
+ * @brief Returns the ISO 8601 string representation of the date and time
120
+ * by calling the toString() method.
121
+ * @return String The date and time in the format YYYY-MM-DDTHH:MM:SS.
122
+ */
123
+ operator arduino::String () const ;
124
+ };
117
125
118
126
enum class Period {
119
127
ONCE_EVERY_2_SEC,
Original file line number Diff line number Diff line change @@ -403,6 +403,10 @@ arduino::String RTCTime::toString() const {
403
403
return formattedTime;
404
404
}
405
405
406
+ RTCTime::operator String () const {
407
+ return toString ();
408
+ }
409
+
406
410
/* -------------------------------------------------------------------------- */
407
411
/* RTClass */
408
412
/* -------------------------------------------------------------------------- */
You can’t perform that action at this time.
0 commit comments