Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dates don't appear #6

Open
maidis opened this issue Dec 15, 2018 · 1 comment
Open

Dates don't appear #6

maidis opened this issue Dec 15, 2018 · 1 comment

Comments

@maidis
Copy link
Contributor

maidis commented Dec 15, 2018

I'm using cutelyst packages from home:buschmann23:Cutelyst:devel repository on Fedora_29 (with Turkish locale) and I'm running a copy of pastelyst on my local but creation dates of pastes don't appear:

Posted by ::1 at

After some tries, I realized that this was the cause of the date filter of Grantlee.

|date:"dd MMM yyyy, hh:mm:ss"

When I delete the above section from HTML codes, I can get dates even though it looks ugly:

Posted by ::1 at 2018-12-15T13:53:47.000

I also tried another Grantlee filter and there was no problem with it, note.created_at|lower gives expected output:

Posted by ::1 at 2018-12-15t13:53:47.000

And this is how created_at looks like at pastelyst.sqlite:

2018-12-15T13:53:30Z

What can I do to solve this situation?

@dantti
Copy link
Member

dantti commented Dec 17, 2018

This is an issue with Grantlee, I didn't even bother reporting as the maintainer shows up once in a year and mostly merge things that are in perfect shape.
The issue is that in Qt 5.7 (or 8 I think) the QDateTime::toString() added time zone information and the Grantlee date filter instead of checking if it's a QDateTime only considers the string representation thus not being able to parse it.
The workaround is to set the TZ of each QDateTime to LocalTime. I need to find some time to create a PR, poke him to merge and if this doesn't happen I'll give up and create a fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants