Merge branch 'dillon/41-voucherify-phase-2b' into development

This commit is contained in:
Dillon Ngo
2023-12-04 12:59:09 +08:00
@@ -3,6 +3,7 @@
namespace App\Classes\Modules\Vouchers\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
use Carbon\Carbon;
use DateTime;
use Illuminate\Support\Facades\Log;
@@ -86,7 +87,8 @@ class VoucherObject implements DataTransferObject
{
try {
if(!$this->startDate) return null;
$dateTime = new DateTime($this->startDate);
// $dateTime = new DateTime($this->startDate);
$dateTime = Carbon::parse($this->startDate)->tz('Asia/Kuala_Lumpur');
return $dateTime;
} catch (\Exception $e) {
Log::error($e);
@@ -101,7 +103,7 @@ class VoucherObject implements DataTransferObject
{
try {
if(!$this->endDate) return null;
$dateTime = new DateTime($this->endDate);
$dateTime = Carbon::parse($this->endDate)->tz('Asia/Kuala_Lumpur');
return $dateTime;
} catch (\Exception $e) {
Log::error($e);