General AM/PM setting affects tc.writedate

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

General AM/PM setting affects tc.writedate

Post by *Lefteous »

The general setting for displaying the date in 12 hour format with an additional 'a' or 'p' at the end are also affecting the default date format (tc.writedate) for content field.

The other date setting here (display century) doesn't affect the default date format in this content field.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I don't understand. Can you give me an example where something goes wrong?
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

1. Open the settings dialog.
2. Go to page 'Tabulators'
3. Check 'Use 12 hour format' but uncheck 'display century'
4. Close the dialog with 'OK'
5. Switch to a long view in a file list
6. In the date column you'll see that dates have an 'a' or 'p' at the end to indicate forenoon or afternoon.
7. Open the settings dialog again.
8. Go to custom columns
9. Create a new custom columns view where you add tc.writedate to the view. Use the default date format.
10. Display the new view.
11. You'll see that tc.writedate also has 'a' or'p' at the end (unexpected). The full four letter format for displaying the centure is displayed though.

Hope it's clear what I mean now. It's not a big issue but clearly a bug.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, tc.writedate uses the am/pm format if it is selected by the user, or the default in the system when nothing was changed by the user. This is important so U.S. residents get the correct format when defining a custom view. If you don't want this, choose one of the subformats, e.g.
.h.m.s for European format,
or
a.m.sP for U.S. style format.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
tc.writedate uses the am/pm format if it is selected by the user, or the default in the system when nothing was changed by the user.
I would also expect that TC displays the system setting in this case but it doesn't. TC uses whatever is set on the tabulator page for 12 hour format.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

2Lefteous
Why? When the user overrides it on the tabulator page, why shouldn't TC use that? The option on the tabulator page uses the system setting as the default.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
Why? When the user overrides it on the tabulator page, why shouldn't TC use that?
1) The page is called 'Tabulator'. So it's not a global setting on how a date is displayed. So what is the scope of this setting? All 'classic column views' or also custom column views?
2) Why is the behavior of the two date-related settings concerning custom columns on the tabulator page different? One affects custom columns, one doesn't.
Post Reply