Skip to content

strftime %p (AM/PM) not working with French locale #126383

@ChronoBoot

Description

@ChronoBoot

Bug report

Bug description:

Description:
When using French locale (fr_FR.UTF-8), strftime's %p format (AM/PM) doesn't work as documented.

Steps to reproduce:

from datetime import datetime
import locale

# Set French locale
locale.setlocale(locale.LC_TIME, 'fr_FR.UTF-8')

now = datetime.now()
print("AM/PM only:", now.strftime('%p'))  # Returns empty string

CPython versions tested on:

3.12

Operating systems tested on:

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions