zimmer-partners / Kirby-Blog

Kirby Plugin for a plain and simple blog.
18 stars 1 forks source link

Date Not Displayed Correctly #1

Closed cptn-cosmo closed 8 years ago

cptn-cosmo commented 8 years ago

Original Report

Instead of the correct date the title of the post gets displayed like this: %05.%07.%16 test post .I have added the c::set('tidy', true); to the config.php. You can see the article page here: http://dawnson.is/blog/test-post

Analysis

Kirby-Blog assumes strftime for date output instead of Kirby's date default. This causes dates to rendered erroneous on standard installations.

Workaround

Add...

c::set('date.handler','strftime');

... to your config.php file.

Potential Drawbacks

Other date output might break because the date default is assumed.

Expected Time of Fix

July 10, 2016

moritzz commented 8 years ago

Thanks. Can you elaborate on this? URL, Screenshot, etc. Thanks, Mo

cptn-cosmo commented 8 years ago

I have created a test post with this content: https://www.dropbox.com/s/we6n7iw8fykpe0h/Screenshot%202016-07-06%2010.57.09.png?dl=0

It is the only post in the blog.

The server is using apache and php7 and i have the mamcached setting enabled in the config.php

Please let me know if you need any additional information.

moritzz commented 8 years ago

Sorry. My new Ad Blocker did cut out all details you provided. Will look into this soon.

moritzz commented 8 years ago

Oh! Because Kirby's default to use PHP date() instead of the superior strftime() (supporting local formats) you might fix this by adding another...

c::set('date.handler','strftime');

... to your config for now. I will make Kirby-Blog automatically adapts to this setting of that later on.

Nota bene; because date is the default, this workaround might break other date output. Therefore I try to do my best to fix this as soon as possible.

cptn-cosmo commented 8 years ago

Awesome, thanks, that worked :) 👍

moritzz commented 8 years ago

Dear @yaccin. I just fixed that bug. Blog should now output dates and times correctly regardless of date.handler settings. Have fun, Moritz