@@ -34,7 +34,7 @@ using chip::Protocols::InteractionModel::Status;
34
34
/* *
35
35
* @brief Helper function to get current timestamp in Epoch format
36
36
*
37
- * @param chipEpoch reference to hold return timestamp
37
+ * @param[out] chipEpoch reference to hold return timestamp. Set to 0 if an error occurs.
38
38
*/
39
39
CHIP_ERROR UtilsGetEpochTS (uint32_t & chipEpoch)
40
40
{
@@ -59,7 +59,7 @@ CHIP_ERROR UtilsGetEpochTS(uint32_t & chipEpoch)
59
59
auto unixEpoch = std::chrono::duration_cast<System::Clock::Seconds32>(cTMs).count ();
60
60
if (!UnixEpochToChipEpochTime (unixEpoch, chipEpoch))
61
61
{
62
- ChipLogError (Zcl, " EVSE: unable to convert Unix Epoch time to Matter Epoch Time" );
62
+ ChipLogError (Zcl, " Unable to convert Unix Epoch time to Matter Epoch Time" );
63
63
return err;
64
64
}
65
65
@@ -78,7 +78,7 @@ CHIP_ERROR UtilsGetEpochTS(uint32_t & chipEpoch)
78
78
* @return bitmap value for day of week
79
79
* Sunday = 0x01, Monday = 0x01 ... Saturday = 0x40 (1<<6)
80
80
*/
81
- uint8_t UtilsGetDayOfWeekUnixEpoch (time_t unixEpoch)
81
+ uint8_t UtilsGetLocalDayOfWeekFromUnixEpoch (time_t unixEpoch)
82
82
{
83
83
// Define a timezone structure and initialize it to the local timezone
84
84
// This will capture any daylight saving time changes
@@ -100,17 +100,17 @@ uint8_t UtilsGetDayOfWeekUnixEpoch(time_t unixEpoch)
100
100
*
101
101
* Sunday = 0x01, Monday = 0x01 ... Saturday = 0x40 (1<<6)
102
102
*/
103
- CHIP_ERROR UtilsGetDayOfWeekNow (uint8_t & dayOfWeekMap)
103
+ CHIP_ERROR UtilsGetLocalDayOfWeekNow (uint8_t & dayOfWeekMap)
104
104
{
105
105
chip::System::Clock::Milliseconds64 cTMs;
106
106
CHIP_ERROR err = chip::System::SystemClock ().GetClock_RealTimeMS (cTMs);
107
107
if (err != CHIP_NO_ERROR)
108
108
{
109
- ChipLogError (Zcl, " EVSE: unable to get current time to check user schedules error=%" CHIP_ERROR_FORMAT, err.Format ());
109
+ ChipLogError (Zcl, " Uable to get current time. error=%" CHIP_ERROR_FORMAT, err.Format ());
110
110
return err;
111
111
}
112
112
time_t unixEpoch = std::chrono::duration_cast<chip::System::Clock::Seconds32>(cTMs).count ();
113
- dayOfWeekMap = UtilsGetDayOfWeekUnixEpoch (unixEpoch);
113
+ dayOfWeekMap = UtilsGetLocalDayOfWeekFromUnixEpoch (unixEpoch);
114
114
115
115
return CHIP_NO_ERROR;
116
116
}
0 commit comments