Open Bug 637133 Opened 13 years ago Updated 2 months ago

Bogus date format used in advanced search tool for nn_NO.UTF-8 and nb_NO.UTF-8

Categories

(Thunderbird :: Search, defect)

x86_64
Linux
defect

Tracking

(Not tracked)

REOPENED

People

(Reporter: tore, Unassigned)

Details

Attachments

(8 files)

User-Agent:       Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0b12) Gecko/20100101 Firefox/4.0b12
Build Identifier: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7

When searching for messages (using the advanced search) by date, the pre-filled date format is bogus (MM.YYYY.DD). This bogus format also has to be used when performing the actual search in order to get the desired result set.

Reproducible: Always

Steps to Reproduce:
1. Open the advanced search tool (Ctrl+Shift+F)
2. Select date as the match
Actual Results:  
The search field is pre-filled with a bogus date format (DD.YYYY.MM).

Expected Results:  
The search field should have been using a more sane date format, e.g., DD.MM.YYYY.

Will attach screenshot in a bit. Locale used is Norwegian Bokmål (nb_NO) - I don't know if this bug is specific to this locale or not.
I get 02/03/2011 when I try your steps, this translates to DD/MM/YYYY - so this works for me on Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0b13pre) Gecko/20110301 Thunderbird/3.3a3pre.

Let's ask the nb_NO owner what he thinks.
Tore, have you checked what your operating system is set to? iirc, we pick that format up from the OS.
It's Linux - the build-identified posted in the original message is the accurate one. BTW, the correct Norwegian date format would be DD.MM.YYYY (periods, not slashes).

Tore
I get the date format "MM/DD/YYYY" on that screen, on an english Ubuntu, TB 3.1.8 nb-NO.
Tore do you have extension installed ?
I have «Toggle Word Wrap» version 1.6 installed. But the problem also remains if I create a completely new profile with no extensions installed.

Tore
Tore (reporter), per Mark Banner's comment 3 you should really check your localized operating system settings for date and time. TB just uses the short date format as defined on your OS, which I just verified on DE/WinXP/TB24.5. So if your OS is set to DD.YYYY.MM, TB will use the same. So this isn't a TB bug, hence invalid. (If this was a TB bug, we'd certainly have more reports and me-too's about it.)
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Actually, my system locale is just fine, and the standard "date" tool reports correct format. This is on a recently installed Fedora 20:

tore@envy:~$ locale
LANG=nb_NO.UTF-8
LC_CTYPE="nb_NO.UTF-8"
LC_NUMERIC="nb_NO.UTF-8"
LC_TIME="nb_NO.UTF-8"
LC_COLLATE="nb_NO.UTF-8"
LC_MONETARY="nb_NO.UTF-8"
LC_MESSAGES="nb_NO.UTF-8"
LC_PAPER="nb_NO.UTF-8"
LC_NAME="nb_NO.UTF-8"
LC_ADDRESS="nb_NO.UTF-8"
LC_TELEPHONE="nb_NO.UTF-8"
LC_MEASUREMENT="nb_NO.UTF-8"
LC_IDENTIFICATION="nb_NO.UTF-8"
LC_ALL=
tore@envy:~$ date
lø. 24. mai 00:51:48 +0200 2014

So this bug is certainly still present and specific to Thunderbird (I have seen this odd date format in no other application, ever), but it might very well be specific for when Thunderbird is running under certain locales, Norwegian in my case, and it might quite possibly also be specific to Linux.

If I set the locale to U.S. English when running Thunderbird (invoking it with "LC_ALL=en_US.UTF-8 thunderbird") I get the expected U.S. date format instead, same as in comment #5.

I see the issue with both the Norwegian locales (nb_NO.UTF-8 and nn_NO.UTF-8). Also, I see it if I specify a bogus locale:

tore@envy:~$ LC_ALL=foo thunderbird 
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (foo): No such file or directory
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (foo): No such file or directory

(thunderbird:10965): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.

(thunderbird:10965): Gdk-WARNING **: locale not supported by C library

...and the same bogus date format is being used in the advanced search dialogue box.

Re-opening the bug report.

Tore
Status: RESOLVED → VERIFIED
(you didn't reopen)

I think what you want to test (w/ norwegian) is

 date +"%x"

Works fine for me, for Finland I get 24.05.2014 which is also what thunderbird uses.
Status: VERIFIED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
(I didn't see how to change the "resolution" attribute.)

$ date +"%x"
24. mai 2014

NOT what thunderbird is using. Try "LC_ALL=nb_NO.UTF-8 thunderbird" and see what you get? (Ctrl-Shift-f, select "Dato" in drop-down list.)

Tore
That should be LC_TIME, but anyhow, that looks like the problem. It should just be numbers and separators, not the name of the month, so I would say there's a bug in the Norwegian locale. Could you file a bug about that upstream?
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → INVALID
Summary: Bogus date format used in advanced search tool → Bogus date format used in advanced search tool for nb_NO.UTF-8
(LC_ALL overrides LC_TIME, so using either should work equally well.)

If it is indeed true that "date +%" should «just be numbers and separators, not the name of the month», it's not only the Norwegian locale that is buggy, as there are *many* locales which are not just "numbers and separators". Some random examples from my Fedora 20 system:

$ LC_ALL=ar_IN date +%x
الثلاثاء 27 مايو 2014
$ LC_ALL=en_HK date +%x
Tuesday, May 27, 2014
$ LC_ALL=eu_ES date +%x
ar., 2014.eko mairen 27a
$ LC_ALL=mr_IN date +%x
मंगळवार 27 मे 2014
$ LC_ALL=ms_MY date +%x
Selasa 27 Mei 2014

Also, the manual page date(1) certainly doesn't suggest that the %x output should be in a specific format:

       %x     locale's date representation (e.g., 12/31/99)

In light of the above I'm more inclined to believe that this is a bug in Thunderbird (possibly stemming from a flawed assumption that "date +%x" is supposed be in a specific format?), than I am inclined to believe your assertion that it is the Norwegian locale that is buggy for including the month name in "date +%x" output. Therefore I am re-opening the bug. That said, I am certainly open to being persuaded otherwise - if you can provide an authoritative reference that confirms your claim that "date +%x" should only contain numbers and separators, then I would happily bring that info to glibc upstream and hopefully get the Norwegian locale (and all the others) fixed.

Tore
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
I have problem searching by date with the latest versione of Thunderbir 31.0 under Windows. The search worked flawlessly with the 24.x versions. I have Thunderbird installed in italian. The search pre-filled with the right date format (DDMMYYYY), but nothing is found. I try other formats (MMDDYYYY, YYYYMMDD, YYYYDDMM, DD/MM/YYYY, DD-MM-YYYY) but the search gave no result.

Massimo
I want to add that I think this is a severe regression that worth attention by someone of mozilla organization.
Problem: Region and Language_EnglishUS_default-date
No problem with: Region and Language_EnglishUS_default-date
No problem with: Region and Language_German_default-date
No problem with: Region and Language_German_non-default-date
TB 38.3.0, Windows7

It seems that changing the short date in "Region and Language" corrupts the "search messages" date format for English US, but not for German

Locale        |  Region and Language short date | TB email   | TB search messages
English US    |  default: M/d/yyyy              | M/d/yyyy   | M/d/yyyy
English US    |  dd-MMM-yy                      | dd-MMM-yy  | dd-yyyy-M  <- WRONG
German        |  default: dd.MM.yyyy            | dd.MM.yyyy | dd.MM.yyyy
German        |  yyyy-MM-dd                     | yyyy-MM-dd | yyyy-MM-dd

I have added the corresponding screen shots to this but.
Summary: Bogus date format used in advanced search tool for nb_NO.UTF-8 → Bogus date format used in advanced search tool for nn_NO.UTF-8 and nb_NO.UTF-8
As shown in the two new screenshots I've just attached, this bug is not yet fixed. The date format is still garbled in both Norwegian locales. These screenshots were taken on Fedora 26 x86_64, running Thunderbird 52.2.1.

Exactly the original bogus format, when searching email: MM/YYYY/DD -- and in TB 68, all these years later, and in the "English (United States" region, no less! I haven't found a solution online or inside TB settings -- is there one?

Note that this format is NOT used for the displayed dates of mail, only for the mail-search function (ctrl-shift-f).

Particulars:
Windows 10-1909.
TB 68.4.2
System short date format: 17/04/05

FWIW, this first appeared about 2 months ago. I believe this was when I upgraded to TB 68. [That was somewhat involuntary, since Mozilla didn't make it clear that this was an overhaul of TB, not an incremental update. :-\ ]

Severity: minor → S4

Same behavior here.
Running Debian 11, XFCE and latest stable TB (115.8.0) installed from Mozilla tar.gz.
My system locale is set to Spanish (Spain) and UTF-8 (LANG=es_ES.UTF-8).
Advanced search displays a bogus date format (see attached image):
02-2024-29 (month-year-day)
Whereas it should be:
29-02-2024 (day-month-year)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: