diff --git a/README.md b/README.md
index f15c738..c06e0cb 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# OpenWeatherOneCall v4.0.0 ![IMAGE OF LIGHTNING](https://github.com/JHershey69/OpenWeatherOneCall/blob/master/images/lightning.jpg)
+# OpenWeatherOneCall v4.0.1 ![IMAGE OF LIGHTNING](https://github.com/JHershey69/OpenWeatherOneCall/blob/master/images/lightning.jpg)
## This is for ESP32 only
##This is an upgrade for OpenWeatherMap API 3.0 and Air Pollution API 2.5
@@ -14,6 +14,7 @@ and you will continue to get all of the features of this library.
Please install these additional libraries (as needed)
+- [ESP32Time] for time functions
- [WiFiTri Library](https://www.github.com/jhershey69/WiFiTri) for WiFi Triangulation
-- A [GOOGLE API KEY](https://developers.google.com/maps/documentation/javascript/get-api-key) is required for WiFiTri
@@ -23,40 +24,9 @@ For ***Dark Sky*** users migrating to a new system please refer to the Variables
*Please make sure you read the [**User Manual**](https://github.com/JHershey69/OpenWeatherOneCall/blob/master/docs/OpenWeatherOneCall%20Manual%20v3.0.4.pdf) as v3.0.3 had many changes and new information*
-v3.0.0 has a **Legacy Mode** to maintain ease of use for previous versions
-
**v3.0.2**
-
--fixed a couple of things so I could release the same thng with a new number
-
**v3.0.3**
-
--added HUMAN READABLE date and time formats, see manual and variable sheet.
-
--Date formats now selectable MM/DD/YY, DD/MM/YY. Time available in 24 or 12 Hour format.
-
--Remove dependancies on all external libraries. Only ArduinoJson v6+ is required now.
-
**v3.0.4**
-
--added HUMAN READABLE sunrise and sunset for CURRENT, see manual and variable sheet.
-
--added snowVolume and rainVolume, see variables sheet, returned in mm or in based on units
-
**v3.0.5**
-
--minor bug fix with language selection.
-
**v3.1.0**
-
--added Air Quality information (see addendum).
-
**v3.1.1**
-
--minor bug fix to historical rain and snow.
-
**v3.1.2**
-
--minor bug fix to library files.
-
**v3.1.3, v3.1.4**
-
--minor bug fix to historical rain and snow.
-
**v3.1.5**
-
--Multiple Alerts update (see added docs).
-
**v3.1.6**
-
--Multiple Alerts memory fix.
-
**v3.1.7, 3.1.8**
-
--Fixed missing code.
-
**v3.1.9**
-
--Minor fix to clear old alerts.
-
**v3.3.0**
-
--Minor fix to update API change.
-
**v3.3.2**
-
--Minor fix to update API change for Air Quality.
-
**v3.3.3**
-
--Minor fix to update API change for Air Quality and Example scripts.
**v4.0.0**
--MAJOR REWRITE with addition options and variable SEE DOCUMENTATION. Some features deprecated no longer supported.
+
**v4.0.1**
+
--ADDED ISO 8601 Human Readable format to Date Time Format.
+
diff --git a/docs/OpenWeatherOneCall_Manual_4-0-1.pdf b/docs/OpenWeatherOneCall_Manual_4-0-1.pdf
new file mode 100644
index 0000000..20a357f
Binary files /dev/null and b/docs/OpenWeatherOneCall_Manual_4-0-1.pdf differ
diff --git a/examples/Simple Latitude Longitude Weather/Simple_Latitude_Longitude_Weather_Example.ino b/examples/Simple Latitude Longitude Weather/Simple_Latitude_Longitude_Weather_Example.ino
index 070ac43..a181715 100644
--- a/examples/Simple Latitude Longitude Weather/Simple_Latitude_Longitude_Weather_Example.ino
+++ b/examples/Simple Latitude Longitude Weather/Simple_Latitude_Longitude_Weather_Example.ino
@@ -85,11 +85,22 @@ int myEXCLUDES = 0; //<-----0 Excludes is default
int myUNITS = IMPERIAL; //<-----METRIC, IMPERIAL, KELVIN (IMPERIAL is default)
//Date Time Format
-int myDTF = 1; //1 M/D/Y 24H
- // 2 D/M/Y 24H
- // 3 M/D/Y 12H
- // 4 D/M/Y 12H
-
+int myDTF = 1; /*
+ 1 M/D/Y 24H
+ 2 D/M/Y 24H
+ 3 M/D/Y 12H
+ 4 D/M/Y 12H
+ 5/6 TIME ONLY 24H
+ 7/8 TIME ONLY 12H
+ 9 DAY SHORTNAME
+ 10 M/D/Y ONLY,
+ 11 D/M/Y ONLY
+
+ ISO8601 options:
+ 12 YYYY-MM-DD ONLY,
+ 13 THH:MM:SS ONLY
+ 14 YYYY-MM-DDTHH:MM:SSY 24H
+ */
//************************************************************************
//for debugging loop counting
diff --git a/library.json b/library.json
index 91fba6b..075911f 100644
--- a/library.json
+++ b/library.json
@@ -9,6 +9,11 @@
"owner": "bblanchon",
"name": "ArduinoJson",
"version": "^7.0.0"
+ },
+ {
+ "owner": "fbiego",
+ "name": "ESP32Time",
+ "version": "^2.0.0"
}
],
"repository":
diff --git a/library.properties b/library.properties
index 65d9908..7e34878 100644
--- a/library.properties
+++ b/library.properties
@@ -8,4 +8,4 @@ category=other
url=https://github.com/JHershey69/OpenWeatherOneCall
architectures=esp32
includes=OpenWeatherOneCall.h
-depends=ArduinoJson
+depends=ArduinoJson, ESP32Time
diff --git a/src/DateTimeConversion.cpp b/src/DateTimeConversion.cpp
index 5380dc7..4bad5f2 100644
--- a/src/DateTimeConversion.cpp
+++ b/src/DateTimeConversion.cpp
@@ -19,6 +19,11 @@ void dateTimeConversion(long _epoch, char *_buffer, int _format)
9 DAY SHORTNAME
10 M/D/Y ONLY
11 D/M/Y ONLY
+
+ ISO8601 options
+ 12 YYYY-MM-DD ONLY
+ 13 THH:MM:SS ONLY
+ 14 YYYY-MM-DDTHH:MM:SS
*/
// NTP Server
@@ -82,6 +87,18 @@ void dateTimeConversion(long _epoch, char *_buffer, int _format)
// D/M/Y 24H
strftime(_buffer,20,"%d/%m/%Y",ptm);
break;
+ case 12:
+ // ISO 8601 YYYY-MM-DD
+ strftime(_buffer,20,"%F",ptm);
+ break;
+ case 13:
+ // ISO8601 THH:MM:SS
+ strftime(_buffer,20,"T%T",ptm);
+ break;
+ case 14:
+ // ISO8601 YYYY-MM-DDTHH:MM:SS
+ strftime(_buffer,20,"%FT%T",ptm);
+ break;
default:
// M/D/Y 24H
strftime(_buffer,20,"%m/%d/%Y",ptm);
diff --git a/src/OpenWeatherOneCall.cpp b/src/OpenWeatherOneCall.cpp
index 2ab3d6d..49ce903 100644
--- a/src/OpenWeatherOneCall.cpp
+++ b/src/OpenWeatherOneCall.cpp
@@ -1,5 +1,5 @@
/*
- OpenWeatherOneCall.cpp v4.0.0
+ OpenWeatherOneCall.cpp v4.0.1
Updated for ArduinoJSON v7 on Aug 1, 2024
copyright 2020/2024 - Jessica Hershey
www.github.com/JHershey69