forked from soutade/libgourou
Fix a bug : gmtime() should used in place of localtime() to keep date in UTC and not local timezone
This commit is contained in:
parent
bdaceba2e0
commit
d8f882a277
|
@ -40,7 +40,7 @@
|
||||||
#define ACS_SERVER "http://adeactivate.adobe.com/adept"
|
#define ACS_SERVER "http://adeactivate.adobe.com/adept"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LIBGOUROU_VERSION "0.3.1"
|
#define LIBGOUROU_VERSION "0.3.2"
|
||||||
|
|
||||||
namespace gourou
|
namespace gourou
|
||||||
{
|
{
|
||||||
|
|
|
@ -291,7 +291,7 @@ namespace gourou
|
||||||
appendTextElem(root, "adept:nonce", nonce.toBase64().data());
|
appendTextElem(root, "adept:nonce", nonce.toBase64().data());
|
||||||
|
|
||||||
time_t _time = time(0) + 10*60; // Cur time + 10 minutes
|
time_t _time = time(0) + 10*60; // Cur time + 10 minutes
|
||||||
struct tm* tm_info = localtime(&_time);
|
struct tm* tm_info = gmtime(&_time);
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
|
|
||||||
strftime(buffer, sizeof(buffer), "%Y-%m-%dT%H:%M:%SZ", tm_info);
|
strftime(buffer, sizeof(buffer), "%Y-%m-%dT%H:%M:%SZ", tm_info);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user