Commit abb5d4a9 authored by Euan游根明's avatar Euan游根明

perf: 设置时区

parent b3e320c6
......@@ -13,6 +13,7 @@ class Nacos
if (empty($res)){
return;
}
date_default_timezone_set('Asia/Shanghai');
self::info('开始拉取配置文件:'.date('Y-m-d H:i:s'));
$url = self::$configs['NACOS_URL'] ?? '';
$group = self::$configs['GROUP'] ?? '';
......@@ -259,13 +260,15 @@ class Nacos
*/
public static function getPath($path,$fileName){
$file = $path.$fileName;
if (!file_exists($file)) {
mkdir($path, 0775, true);
touch($file);
chmod($file, 0775);
$filePath = $path.$fileName;
if (!file_exists($filePath)) {
if (!file_exists($path)) {
mkdir($path, 0775, true);
}
touch($filePath);
chmod($filePath, 0775);
}
return $file;
return $filePath;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment