• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Dateinputrow not observing user timezone

Affected version
2.0 Beta 6

Snog

Well-known member
#1
If you have a value for a timestamp, the template date function displays it properly for the user's timezone, however the date picker does not.

Example (timestamp is 1398830400 - the date shown as the value (2014-04-30) is converted by the date function - timezone: Eastern (US/Canada)):

badtimezone.png

Template code:
Code:
<xf:dateinputrow name="dateline" label="Start date" value="{{ date($value.dateline,'Y-m-d') }}" />
 
Last edited:

Snog

Well-known member
#2
This may or may not still be a bug.

But I was able to get the correct display by using the default date format for the site this is on. (just using date($value.dateline))
 

Kier

XenForo Developer
Staff member
#3
This is due to the specification for <input type="date" />, where the expected format is always yyyy-mm-dd, so there's not a lot we can do there, it's just how it works.
 

Snog

Well-known member
#4
Hmm.. I swear that's what's in the input box, but not what's displayed in the selection dropdown. The dropdown is showing the UTC time for the input box.

Either way, it works with the other date calc as I said.