Skip to content

Commit ac19030

Browse files
committed
Fix date parsing
1 parent d4b6e02 commit ac19030

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ArduinoCellular.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ Time parseTimestamp(const String &timestampStr) {
249249

250250
int firstSlashIndex = date.indexOf('/');
251251
int secondSlashIndex = date.lastIndexOf('/');
252-
day = date.substring(0, firstSlashIndex).toInt();
252+
year = date.substring(0, firstSlashIndex).toInt() + 2000;
253253
month = date.substring(firstSlashIndex + 1, secondSlashIndex).toInt();
254-
year = date.substring(secondSlashIndex + 1).toInt() + 2000;
254+
day = date.substring(secondSlashIndex + 1).toInt();
255255

256256
int firstColonIndex = time.indexOf(':');
257257
int secondColonIndex = time.lastIndexOf(':');

0 commit comments

Comments
 (0)