General AM/PM setting affects tc.writedate
Moderators: Hacker, petermad, Stefan2, white
General AM/PM setting affects tc.writedate
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.
The other date setting here (display century) doesn't affect the default date format in this content field.
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, I don't understand. Can you give me an example where something goes wrong?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
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.
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.
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
.h.m.s for European format,
or
a.m.sP for U.S. style format.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2ghisler(Author)
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.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.
- ghisler(Author)
- Site Admin
- Posts: 50549
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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.
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
https://www.ghisler.com
2ghisler(Author)
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.
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?Why? When the user overrides it on the tabulator page, why shouldn't TC use that?
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.