mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-14 15:37:53 +00:00
fix: add timestamp_utc system varibale
This commit is contained in:
parent
23a7a217db
commit
161200df44
1 changed files with 4 additions and 1 deletions
|
|
@ -221,7 +221,7 @@ class Plugin extends Model
|
||||||
|
|
||||||
// Apply basic replacements
|
// Apply basic replacements
|
||||||
$template = str_replace(array_keys($replacements), array_values($replacements), $template);
|
$template = str_replace(array_keys($replacements), array_values($replacements), $template);
|
||||||
|
|
||||||
// Convert Ruby/strftime date formats to PHP date formats
|
// Convert Ruby/strftime date formats to PHP date formats
|
||||||
$template = $this->convertDateFormats($template);
|
$template = $this->convertDateFormats($template);
|
||||||
|
|
||||||
|
|
@ -345,6 +345,9 @@ class Plugin extends Model
|
||||||
'config' => $this->configuration ?? [],
|
'config' => $this->configuration ?? [],
|
||||||
...(is_array($this->data_payload) ? $this->data_payload : []),
|
...(is_array($this->data_payload) ? $this->data_payload : []),
|
||||||
'trmnl' => [
|
'trmnl' => [
|
||||||
|
'system' => [
|
||||||
|
'timestamp_utc' => now()->utc()->timestamp,
|
||||||
|
],
|
||||||
'user' => [
|
'user' => [
|
||||||
'utc_offset' => '0',
|
'utc_offset' => '0',
|
||||||
'name' => $this->user->name ?? 'Unknown User',
|
'name' => $this->user->name ?? 'Unknown User',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue