Fix #41: Use correct SQL datetime format for tokens
authorChristian Weiske <cweiske@cweiske.de>
Tue, 10 May 2016 05:37:05 +0000 (07:37 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 10 May 2016 05:37:05 +0000 (07:37 +0200)
lib/tokenstorage.php

index 94526b1..8b266f1 100644 (file)
@@ -76,7 +76,7 @@ class TokenStorage
                 (string) $token->verifier,
                 (string) $token->callback,
                 (string) $token->client,
                 (string) $token->verifier,
                 (string) $token->callback,
                 (string) $token->client,
-                (string) date('c'),
+                date('Y-m-d H:i:s'),
             )
         );
     }
             )
         );
     }
@@ -173,7 +173,7 @@ class TokenStorage
             'UPDATE `*PREFIX*grauphel_oauth_tokens`'
             . ' SET `token_lastuse` = ? WHERE `token_key` = ?',
             array(
             'UPDATE `*PREFIX*grauphel_oauth_tokens`'
             . ' SET `token_lastuse` = ? WHERE `token_key` = ?',
             array(
-                (string) date('c'),
+                date('Y-m-d H:i:s'),
                 $tokenKey,
             )
         );
                 $tokenKey,
             )
         );