|
@@ -6715,7 +6715,20 @@ int sendMeterValuesRequest(int gun_index, ReadingContext dataType)
|
|
|
t = time(NULL);
|
|
|
/*UTC time and date*/
|
|
|
tm = gmtime(&t);
|
|
|
- strftime(buf,28,"%Y-%m-%dT%H:%M:%SZ", tm);
|
|
|
+
|
|
|
+ if(dataType == ReadingContext_Sample_Clock)
|
|
|
+ {
|
|
|
+ struct tm *tmTarget;
|
|
|
+ struct timeb tbTarget;
|
|
|
+ tbTarget.time = mktime(tm);
|
|
|
+ tbTarget.time -= (atoi((char*)ShmOCPP16DataPH->ConfigurationTable.CoreProfile[ClockAlignedDataInterval].ItemData));
|
|
|
+ tmTarget = gmtime(&tbTarget.time);
|
|
|
+ strftime(buf,28,"%Y-%m-%dT%H:%M:%SZ", tmTarget);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ strftime(buf,28,"%Y-%m-%dT%H:%M:%SZ", tm);
|
|
|
+ }
|
|
|
strcpy((char *)ShmOCPP16DataPH->MeterValues[gun_index].MeterValue[0].TimeStamp, buf);
|
|
|
|
|
|
//DEBUG_INFO("ShmSysConfigAndInfo->SysConfig.ModelName[0]=%c\n", ShmSysConfigAndInfo->SysConfig.ModelName[0]);
|
|
@@ -14769,7 +14782,6 @@ void handleBootNotificationResponse(char *payload, int gun_index)
|
|
|
}
|
|
|
else if(strcmp(statusStr, RegistrationStatusStr[RegistrationStatus_Pending]) == 0)
|
|
|
{
|
|
|
- BootNotificationInterval = intervalInt;
|
|
|
server_pending = TRUE;
|
|
|
}
|
|
|
//syncDateTimeRTC(ShmOCPP16DataPH->BootNotification.ResponseCurrentTime);
|