Merge pull request #104 from thooge/master

Add ISO date format
This commit is contained in:
Norbert Walter 2024-10-21 09:16:19 +02:00 committed by GitHub
commit 7cf5fb88e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -60,6 +60,9 @@ FormatedData formatValue(GwApi::BoatValue *value, CommonData &commondata){
else if(String(dateFormat) == "US"){
snprintf(buffer,bsize,"%02d/%02d/%04d",parts.tm_mon+1,parts.tm_mday,parts.tm_year+1900);
}
else if(String(dateFormat) == "ISO"){
snprintf(buffer,bsize,"%04d-%02d-%02d",parts.tm_year+1900,parts.tm_mon+1,parts.tm_mday);
}
else{
snprintf(buffer,bsize,"%02d.%02d.%04d",parts.tm_mday,parts.tm_mon+1,parts.tm_year+1900);
}

View File

@ -251,11 +251,12 @@
"label": "Date Format",
"type": "list",
"default": "DE",
"description": "Date format [DE|GB|US] DE: 31.12.2022, GB: 31/12/2022, US: 12/31/2022",
"description": "Date format [DE|GB|US|ISO] DE: 31.12.2022, GB: 31/12/2022, US: 12/31/2022, ISO: 2022-12-31",
"list": [
"DE",
"GB",
"US"
"US",
"ISO"
],
"category": "OBP60 Units",
"capabilities": {