Posted by & filed under Developer Blog.

I don’t know if it’s because the Lucid theme for Mephisto was ported from Typo, but it was displaying the timestamp on my entries as UTC instead of MST, which is what I told Mephisto my time zone is in the Settings. Apparently Lucid uses JavaScript to convert the timestamp into a more descriptive time (“about an hour ago”) if the timestamp is less than a week old and otherwise displays the date.

Without having enough time to really look into it, I believe Mephisto is using TZinfo Gem to convert the database timestamp to whatever you set your timezone to be in the Settings and Lucid is reading that as UTC anyway and attempting to convert it to the users current time.

So rather that fudging the JavaScript, I decided to reformat the date that Lucid sees and let it do it’s thing. In other words, I plugged the following into the home.liquid, index.liquid, and single.liquid templates:


<p class="auth">Posted 
<span class="typo_date" title="{{ article.published_at }}">
{{ article.published_at }}


<p class="auth">Posted
<span class="typo_date" title="{{ article.published_at | date: "%a %b %d %H:%M:%S MST %Y" }}">
{{ article.published_at | date: "%a %b %d %H:%M:%S MST %Y" }}

where MST is my own time zone.

Hope this helps others, as I wasn’t able to find any other info about it.