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

Incorrect support clock custom format for T #1862

Open
rysson opened this issue Feb 1, 2023 · 5 comments
Open

Incorrect support clock custom format for T #1862

rysson opened this issue Feb 1, 2023 · 5 comments

Comments

@rysson
Copy link

rysson commented Feb 1, 2023

Expected Behavior

World clock custom format

T'/'T

Applet should show

+01:00/+01:00
Current Behavior

Current view

+01:00/T
Possible Solution

Fix this part of code

            if (result[tz + length] == QLatin1Char('\''))
                // <--- here is an apostrophe skipped, then...
                //      next apostrophe starts a section instead of stop the section
                ++length;
            else
                replacement.append(QLatin1Char('\''));
Steps to Reproduce (for bugs)
  1. Configure "World Clock"
  2. Select "Custom"
  3. Type +01:00/T
Context
System Information
  • LXQt-panel Version: 1.2.1
  • LXQt Version: 1.2.0
  • Distribution & Version: Debian Testing
  • Qt Version: 5.15.8
  • liblxqt Version: 1.2.0
rysson added a commit to rysson/lxqt-panel that referenced this issue Feb 1, 2023
@stefonarch
Copy link
Member

immagine

dddd d MMMM | <b>HH:mm</b> (T/T) works fine, why the apostrophes?

Sorry for the late attention.

@rysson
Copy link
Author

rysson commented Aug 29, 2024

Yes, it was some time ago 😆

If I remember there was problem with strike text and format.

For example format 'xx'T'T'T'yy' shows xx+02:00+02:00+02:00yy
But should be xx+02:00T+02:00yy

I have a few more patches (ex. jjj – day of the year) if you are interest.

@stefonarch
Copy link
Member

For example format 'xx'T'T'T'yy' shows xx+02:00+02:00+02:00yy

Again, why not xx T T T yy (yy shows "24")?

No idea if anybody would be interested in the day of the year though.

@rysson
Copy link
Author

rysson commented Aug 29, 2024

Because '...' is literal text.
You can use rich-text in this field and I expect then text will be text, not some format.
Then if text in an apostrophe means literal text then should be literal not sometimes literal.

Next, I think I'm „anybody”. I use the day of the year. It helps me to take my medicine.

Now I use this format:

'<html><head><style>
* {vertical-align: middle; text-align: center; border-spacing: 0; border-collapse: collapse; padding: 0;}
</style></head>
<body>
<table >
 <tr>
  <td>
   <b>'HH:mm'</b><font size="-1">:'ss'</font>
  </td>
  <td>
   <font size="-1">'jjj'</font>
  </td>
 </tr>
 <tr>
  <td>
   <font size="-1">'ddd, '<b>'d'</b>' MMM yyyy'</font>
  </td>
  <td>
   <font size="-2">W'VV'</font>
  </td>
 </tr>
</table>
</body></html>'

and how it looks:
20240829-193140-128x35

But we don't have to hurry. We can talk about extensions later.

Now we are talking about the bug.
20240829-193726-757x77a
But in 'xx'T'T'T'yy' the middle T is in single quote and it is interpreted as time zone.

@stefonarch
Copy link
Member

We accept PRs (proved formula).

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