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



8 years ago
a year ago


(Reporter: tore, Unassigned)


Firefox Tracking Flags

(Not tracked)



(7 attachments)



8 years ago
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: 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.

Comment 1

8 years ago
Created attachment 515453 [details]
Screenshot of the bogus default date format used in the advanced search tool
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.

Comment 4

8 years ago
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).


Comment 5

8 years ago
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 ?

Comment 7

8 years ago
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 (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.)
Last Resolved: 5 years ago
Resolution: --- → INVALID

Comment 9

5 years ago
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
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.

(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.
Ever confirmed: true
Resolution: INVALID → ---

Comment 11

5 years ago
(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.)

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?
Last Resolved: 5 years ago5 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

Comment 13

5 years ago
(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.

Resolution: INVALID → ---

Comment 14

4 years ago
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.


Comment 15

4 years ago
I want to add that I think this is a severe regression that worth attention by someone of mozilla organization.

Comment 16

3 years ago
Created attachment 8693303 [details]
Region and Language_EnglishUS_non-default-date.jpg

Problem: Region and Language_EnglishUS_default-date

Comment 17

3 years ago
Created attachment 8693304 [details]
Region and Language_EnglishUS_default-date.jpg

No problem with: Region and Language_EnglishUS_default-date

Comment 18

3 years ago
Created attachment 8693305 [details]
Region and Language_German_default-date.jpg

No problem with: Region and Language_German_default-date

Comment 19

3 years ago
Created attachment 8693306 [details]
Region and Language_German_non-default-date.jpg

No problem with: Region and Language_German_non-default-date

Comment 20

3 years ago
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.


a year ago
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

Comment 21

a year ago
Created attachment 8884628 [details]
Screenshot of search window from Thunderbird 5.21 running in nb_NO.UTF-8 locale

Comment 22

a year ago
Created attachment 8884629 [details]
Screenshot of search window from Thunderbird 5.21 running in nn_NO.UTF-8 locale

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.
You need to log in before you can comment on or make changes to this bug.