Store datetime in UTC format now, and fix presentation of TZUTC. Also standardise message summaries on Notifications
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 42s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m51s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
2024-06-28 23:27:06 +10:00
parent fc930ba6c2
commit 4d7af7c7e3
17 changed files with 51 additions and 58 deletions

View File

@@ -59,9 +59,15 @@ trait MessageAttributes
return ($this->msg_src) ? $this->msg_src : $this->rebuildMessage();
}
/**
* This is used to build our data in a timezone date, so that when exported, we include the right TZUTC
*
* @return Carbon
*/
public function getDateAttribute(): Carbon
{
return $this->datetime->utcOffset($this->tzoffset);
// Datetime is in utc, and tzoffset describes what that local time is
return $this->datetime->clone()->utcOffset($this->tzoffset);
}
public function getOriginAttribute(string $val=NULL): ?string