for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the iidestiny/flysystem-oss.
*
* (c) iidestiny <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Iidestiny\Flysystem\Oss\Traits;
use DateTime;
trait SignatureTrait
{
/**
* gmt.
* @param $time
* @return string
* @throws \Exception
public function gmt_iso8601($time)
// fix bug https://connect.console.aliyun.com/connect/detail/162632
return (new \DateTime(null,new \DateTimeZone('UTC')))->setTimestamp($time)->format('Y-m-d\TH:i:s\Z')
}