In my user profiles, I have a text field where the user's timezone is set, in the standard America/New_York
format.
Craft's timezone is set to New York, and the server's timezone is set to UTC.
I'm trying to use the Twig date filter to localize the times using the user profile timezone field, but it doesn't seem to be working.
For example:
{{ message.postDate | date('n/d/Y g:ia') }}
outputs 12/11/2016 1:00pm
I'm hoping that for a user in the pacific timezone, this time will display as 10:00am. But this is what happens:
{{ currentUser.userTimezone }}
outputs America/Los_Angeles
{{ message.postDate | date('n/d/Y g:ia', currentUser.userTimezone) }}
still outputs 12/11/2016 1:00pm
I've also tried just hard-coding a different timezone in, to no avail:
{{ message.postDate | date('n/d/Y g:ia', 'America/Los_Angeles') }}
still outputs 12/11/2016 1:00pm
Am I doing something wrong? Or is there a different way to do this?