From ae4a349d79e0db12fdca9c235a4c1e5e70c48da3 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 16 Sep 2018 04:18:22 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9E=9C=EB=8D=A4=20=ED=84=B4=EC=97=90?= =?UTF-8?q?=EC=84=9C=20'=EC=86=8C=EC=88=98=EC=A0=90'=EC=9D=84=20=EB=8B=A4?= =?UTF-8?q?=EB=A3=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/hwe/func.php b/hwe/func.php index e1bfac03..02c182ff 100644 --- a/hwe/func.php +++ b/hwe/func.php @@ -2962,27 +2962,13 @@ function SabotageInjury($city, $type=0) { function getRandTurn($term) { $randSecond = Util::randRangeInt(0, 60 * $term - 1); $randFraction = Util::randRangeInt(0, 999999) / 1000000;//6자리 소수 - - $randTime = new \DateInterval("PT0S"); - $randTime->s = $randSecond; - $randTime->f = $randFraction; - $turnTime = new \DateTime(); - $turnTime->add($randTime); - - return $turnTime->format('Y-m-d H:i:s.u'); + return TimeUtil::nowAddSeconds($randSecond + $randFraction, true); } function getRandTurn2($term) { $randSecond = Util::randRangeInt(0, 60 * $term - 1); $randFraction = Util::randRangeInt(0, 999999) / 1000000;//6자리 소수 - $randTime = new \DateInterval("PT0S"); - $randTime->s = $randSecond; - $randTime->f = $randFraction; - - $turnTime = new \DateTime(); - $turnTime->sub($randTime); - - return $turnTime->format('Y-m-d H:i:s.u'); + return TimeUtil::nowAddSeconds(- $randSecond - $randFraction, true); }