We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ecb8cb7 + 1aa97a9 commit b34fd2fCopy full SHA for b34fd2f
1 file changed
wolfcrypt/src/port/Espressif/esp_sdk_time_lib.c
@@ -181,10 +181,15 @@ int set_fixed_default_time(void)
181
{
182
/* ideally, we'd like to set time from network,
183
* but let's set a default time, just in case */
184
+
185
+ ESP_LOGV(TAG, "Default Date %s", __DATE__);
186
+ ESP_LOGV(TAG, "YEAR %d", YEAR);
187
+ ESP_LOGV(TAG, "MONTH %d", MONTH);
188
+ ESP_LOGV(TAG, "DAY %d", DAY);
189
struct tm timeinfo = {
- .tm_year = YEAR,
- .tm_mon = MONTH, /* Month, where 0 = Jan */
- .tm_mday = DAY, /* Numeric decimal day of the month */
190
+ .tm_year = YEAR - 1900, /* years since 1900 */
191
+ .tm_mon = MONTH - 1, /* Month, where 0 = Jan */
192
+ .tm_mday = DAY - 1, /* Numeric decimal day of the month */
193
.tm_hour = 13,
194
.tm_min = 1,
195
.tm_sec = 5
0 commit comments