From c9047ae0e25ac1e16c750500fa75c781ee84eb42 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Mon, 1 Aug 2022 11:12:01 +0100 Subject: [PATCH] [CAT} force timestamp to be utc --- application/models/Cat.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/application/models/Cat.php b/application/models/Cat.php index 7aca87d2..cbe33b18 100644 --- a/application/models/Cat.php +++ b/application/models/Cat.php @@ -7,7 +7,8 @@ if ($result['timestamp'] != "") { $timestamp = $result['timestamp']; } else { - $timestamp = date("Y-m-d H:i:s"); + $given->setTimezone(new DateTimeZone("UTC")); + $timestamp = $given->format("Y-m-d H:i:s"); } $this->db->where('radio', $result['radio']);