Release Notes
Announcements
<?phpfunction main_handler($event, $context) {print_r($_ENV);echo getenv('SCF_RUNTIME');return "hello world";}?>
TZ=Asia/Shanghai environment variable to the function, and use date_default_timezone_set(getenv('TZ')); in the function code to set the needed time zone, as shown below:<?phpfunction main_handler($event, $context) {date_default_timezone_set(getenv('TZ'));echo date("Y-m-d H:i:s",time());return "hello world";}?>
<?phpfunction main_handler($event, $context) {$url = 'https://cloud.tencent.com';echo file_get_contents($url);return "hello world";}?>
フィードバック