Skip to content

Commit

Permalink
Fix Time and GSMClient integration issue #614 in Core.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Dec 27, 2023
1 parent 43d4a98 commit 2687ec2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Firebase Arduino Client Library for ESP8266 and ESP32",
"version": "4.4.9",
"version": "4.4.10",
"keywords": "communication, REST, esp32, esp8266, arduino",
"description": "The library supports Firebase products e.g. Realtime database, Cloud Firestore database, Firebase Storage and Google Cloud Storage, Cloud Functions for Firebase and Cloud Messaging. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=Firebase Arduino Client Library for ESP8266 and ESP32

version=4.4.9
version=4.4.10

author=Mobizt

Expand Down
5 changes: 3 additions & 2 deletions src/client/FB_TCP_Client.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Firebase TCP Client v1.0.2
* Firebase TCP Client v1.0.3
*
* Created September 14, 2023
* Created December 27, 2023
*
* The MIT License (MIT)
* Copyright (c) 2022 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -1007,6 +1007,7 @@ class Firebase_TCP_Client : public Client
timeinfo.tm_min = min3;
timeinfo.tm_sec = sec3;
time_t ts = mktime(&timeinfo);
ts -= timezone * 3600;
return ts;
}
}
Expand Down
9 changes: 7 additions & 2 deletions src/core/FirebaseCore.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

/**
* Google's Firebase Token Management class, FirebaseCore.cpp version 1.0.1
* Google's Firebase Token Management class, FirebaseCore.cpp version 1.0.2
*
* Created September 12, 2023
* Created December 27, 2023
*
* The MIT License (MIT)
* Copyright (c) 2023 K. Suwatchai (Mobizt)
Expand Down Expand Up @@ -687,12 +687,17 @@ void FirebaseCore::tokenProcessingTask()

if (_cli_type == firebase_client_type_external_gsm_client)
{
if (!tcpClient)
newClient(&tcpClient);

uint32_t _time = tcpClient->gprsGetTime();
if (_time > 0)
{
baseTs = _time;
setTimestamp(_time);
}

freeClient(&tcpClient);
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/FirebaseCore.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

/**
* Google's Firebase Token Management class, FirebaseCore.h version 1.0.1
* Google's Firebase Token Management class, FirebaseCore.h version 1.0.2
*
* Created September 12, 2023
* Created December 27, 2023
*
* The MIT License (MIT)
* Copyright (c) 2023 K. Suwatchai (Mobizt)
Expand Down
4 changes: 2 additions & 2 deletions src/core/Firebase_Client_Version.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#ifndef FIREBASE_CLIENT_VERSION
#define FIREBASE_CLIENT_VERSION "4.4.9"
#define FIREBASE_CLIENT_VERSION_NUM 40409
#define FIREBASE_CLIENT_VERSION "4.4.10"
#define FIREBASE_CLIENT_VERSION_NUM 40410

#define FIREBASE_CLIENT_VERSION_CHECK(ver) (true)
#endif

0 comments on commit 2687ec2

Please sign in to comment.