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

Date filter tests fail in Debian #51

Closed
giomasce opened this issue Mar 30, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@giomasce
Copy link

commented Mar 30, 2019

Hi, I am triaging bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=917711 in Debian. There seems to be a problem with the Grantlee date filter, which I have narrowed down to the following snippet: in this line the date object, which has to be formatted, is received serialized in a string with template "yyyy-MM-ddThh:mm:ss", but the actual string I see is "2008-01-01T00:00:00.000" (notice the additional milliseconds digits). I can see adding this line just at the beginning of the functions:

std::cerr << "input = " << QString(getSafeString(input)).toStdString() << std::endl;

If I change the decoding template to "yyyy-MM-ddThh:mm:ss.000", then the test is fixed, but I am not sure this is the right internal protocol. Could you please assist me in finding what is the clean solution?

Let me add that the date object to be expanded in the template is generated here and is passed to the template engine a few lines below in unserialized form. So it seems there is a disagreement on the serialization template between the code that serializes it before calling the filter and the filter itself: what is the actual template that is meant to be used here?

Thank you very much for your help!

@giomasce

This comment has been minimized.

Copy link
Author

commented Apr 18, 2019

Fixed by 3cb4bd2.

@giomasce giomasce closed this Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.