Update Pateint get dengan format ISO 8601_v2
This commit is contained in:
parent
a69a5719ad
commit
0810f837af
@ -344,12 +344,17 @@ class PatientModel extends Model {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Conversion Time to Format Y-m-d\TH:i:s\Z
|
// Conversion Time to Format Y-m-d\TH:i:s\Z
|
||||||
private function formatedDate($dateString) {
|
private function formattedDate(?string $dateString): ?string {
|
||||||
// return $date->format('Y-m-d H:i');
|
try {
|
||||||
$dt = new \DateTime($dateString, new \DateTimeZone("UTC"));
|
if (empty($dateString)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// Format jadi ISO 8601 dengan 'Z'
|
$dt = new \DateTime($dateString, new \DateTimeZone("UTC"));
|
||||||
return $dt->format('Y-m-d\TH:i:s\Z');
|
return $dt->format('Y-m-d\TH:i:s\Z'); // ISO 8601 UTC
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conversion Time to Format j M Y
|
// Conversion Time to Format j M Y
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user