<p>Is this a custom template global from a plugin or is it a field on a Craft global set, because those you usually access with <code>{{ myGlobalSet.endDate }}</code>.</p>

CC BY-SA 3.0
2015-10-14T23:10:16.003Z
2015-10-14T23:10:16.003Z
carlcs
<p>This one is new to me. I've got the timezone set in my admin panel to Denver but I get this this error when I try using a global in my template...</p>

<pre><code>DateTime::__construct(): Failed to parse time string (End Date) at position 0 (E): The timezone could not be found in the database
</code></pre>

<p>Here is my code in the template</p>

<pre><code>{{ endDate | date("U") }}
</code></pre>

<p>My global is called End Date (endDate) and is using a date field type</p>

CC BY-SA 3.0
2015-10-12T17:31:55.013Z
What happens when you do `{{ endDate }}`? Is this a custom template global from a plugin or is it a field on a Craft global set, because those you usually access with `{{ myGlobalSet.endDate }}`.
carlcs
CC BY-SA 3.0
2015-10-14T16:14:46.917Z
Hey @brunam, did you solve this in the meantime?
carlcs
CC BY-SA 3.0
2015-10-14T19:23:18.640Z
your suggestion was correct actually. forget the the myGlobalSet part
brunam
CC BY-SA 3.0
2015-10-14T23:11:44.607Z
Good to see you solved this. Added it as an answer.
carlcs
<datetime>
The timezone could not be found in the database
# The timezone could not be found in the database

(Asked by: username_0 on 2015-10-12)

This one is new to me. I've got the timezone set in my admin panel to Denver but I get this this error when I try using a global in my template...
DateTime::__construct(): Failed to parse time string (End Date) at position 0 (E): The timezone could not be found in the database

Here is my code in the template
{{ endDate | date("U") }}

My global is called End Date (endDate) and is using a date field type

**Tags:** datetime

> **Comments:**
> **username_1**: What happens when you do `{{ endDate }}`? Is this a custom template global from a plugin or is it a field on a Craft global set, because those you usually access with `{{ myGlobalSet.endDate }}`.  
> **username_1**: Hey @username_0, did you solve this in the meantime?  
> **username_0**: your suggestion was correct actually. forget the the myGlobalSet part  
> **username_1**: Good to see you solved this. Added it as an answer.  

---

## 1 answers

### Answer by username_1 on 2015-10-14. Score: 2 | Accepted answer

Is this a custom template global from a plugin or is it a field on a Craft global set, because those you usually access with `{{ myGlobalSet.endDate }}`.


---

