[Django] #36543: French Canadian locale formats times incorrectly

9 views
Skip to first unread message

Django

unread,
Aug 6, 2025, 11:52:38 AMAug 6
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
-------------------------------------+-------------------------------------
Reporter: Chris-Anderson_JLLT | Type: Bug
Status: new | Component:
| Internationalization
Version: 5.2 | Severity: Normal
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
The `fr_CA` locale uses the format string `H\xa0h\xa0i` as its time format
and as the time portion of its datetime formats. The comments indicate
this should be producing output like `13 h 40` however, because `h` is the
flag for 12-hour time, this instead gets formatted like `13 01 40`. The
format strings should be updated to escape the `h` character.
--
Ticket URL: <https://code.djangoproject.com/ticket/36543>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 6, 2025, 1:35:22 PMAug 6
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
--------------------------------------+------------------------------------
Reporter: Anderson, Chris | Owner: (none)
Type: Bug | Status: new
Component: Internationalization | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Natalia Bidart):

* cc: Claude Paroz, Simon Charette (added)
* stage: Unreviewed => Accepted
* version: 5.2 => dev

Comment:

Thank you @Chris-Anderson_JLLT, I managed to reproduce using:
{{{#!python
import django
from django.utils import timezone, translation, formats
from datetime import time
django.setup()
translation.activate('fr-ca')
print("Formatted time:", formats.time_format(time(13, 40)))
}}}
Which shows:
{{{
Formatted time: 13 01 40
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/36543#comment:1>

Django

unread,
Aug 6, 2025, 1:36:49 PMAug 6
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
--------------------------------------+------------------------------------
Reporter: Anderson, Chris | Owner: (none)
Type: Bug | Status: new
Component: Internationalization | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by Natalia Bidart):

`fr_CA` format was added in #34784.
--
Ticket URL: <https://code.djangoproject.com/ticket/36543#comment:2>

Django

unread,
Aug 6, 2025, 2:09:42 PMAug 6
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
--------------------------------------+------------------------------------
Reporter: Anderson, Chris | Owner: Mridul
Type: Bug | Status: assigned
Component: Internationalization | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mridul):

* owner: (none) => Mridul
* status: new => assigned

Comment:

I would love to work on this ticket and will make sure to provide updates
on the ticket as I make progress
--
Ticket URL: <https://code.djangoproject.com/ticket/36543#comment:3>

Django

unread,
Aug 8, 2025, 12:32:19 PMAug 8
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
--------------------------------------+------------------------------------
Reporter: Anderson, Chris | Owner: Mridul
Type: Bug | Status: assigned
Component: Internationalization | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mridul):

* has_patch: 0 => 1

Comment:

PR:[https://github.com/django/django/pull/19716]
--
Ticket URL: <https://code.djangoproject.com/ticket/36543#comment:4>

Django

unread,
Aug 8, 2025, 1:31:49 PMAug 8
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
--------------------------------------+------------------------------------
Reporter: Anderson, Chris | Owner: Mridul
Type: Bug | Status: assigned
Component: Internationalization | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Natalia Bidart):

* needs_tests: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36543#comment:5>

Django

unread,
Aug 8, 2025, 6:36:26 PMAug 8
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
--------------------------------------+------------------------------------
Reporter: Anderson, Chris | Owner: Mridul
Type: Bug | Status: assigned
Component: Internationalization | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mridul):

* needs_tests: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36543#comment:6>

Django

unread,
Aug 15, 2025, 5:19:17 AMAug 15
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
--------------------------------------+------------------------------------
Reporter: Anderson, Chris | Owner: Mridul
Type: Bug | Status: assigned
Component: Internationalization | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Sarah Boyce):

* needs_better_patch: 0 => 1

--
Ticket URL: <https://code.djangoproject.com/ticket/36543#comment:7>

Django

unread,
Aug 28, 2025, 8:43:00 AMAug 28
to django-...@googlegroups.com
#36543: French Canadian locale formats times incorrectly
--------------------------------------+------------------------------------
Reporter: Anderson, Chris | Owner: Mridul
Type: Bug | Status: assigned
Component: Internationalization | Version: dev
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Mridul):

* needs_better_patch: 1 => 0

--
Ticket URL: <https://code.djangoproject.com/ticket/36543#comment:8>
Reply all
Reply to author
Forward
0 new messages