mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Fix unwanted timezone change when using solapi SMS API
This commit is contained in:
parent
7056a44396
commit
17675ab32f
1 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Rhymix\Framework\Drivers\SMS;
|
namespace Rhymix\Framework\Drivers\SMS;
|
||||||
|
use Rhymix\Framework\Security;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Solapi SMS driver.
|
* The Solapi SMS driver.
|
||||||
|
|
@ -164,9 +165,8 @@ class SolAPI extends Base implements \Rhymix\Framework\Drivers\SMSInterface
|
||||||
*/
|
*/
|
||||||
private function getHeader()
|
private function getHeader()
|
||||||
{
|
{
|
||||||
date_default_timezone_set('Asia/Seoul');
|
$date = gmdate('Y-m-d\TH:i:s\Z');
|
||||||
$date = date('Y-m-d\TH:i:s.Z\Z', time());
|
$salt = Security::getRandom(32);
|
||||||
$salt = uniqid();
|
|
||||||
$signature = hash_hmac('sha256', $date . $salt, $this->_config['api_secret']);
|
$signature = hash_hmac('sha256', $date . $salt, $this->_config['api_secret']);
|
||||||
return "HMAC-SHA256 apiKey={$this->_config['api_key']}, date={$date}, salt={$salt}, signature={$signature}";
|
return "HMAC-SHA256 apiKey={$this->_config['api_key']}, date={$date}, salt={$salt}, signature={$signature}";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue