Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. locales and date formats
Qt 6.11 is out! See what's new in the release blog

locales and date formats

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 984 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 00000 Offline
    00000 Offline
    0000
    wrote on last edited by
    #1

    End user here with very minimal programming skills (which I hope are good enough to patch and recompile the source if I have to).

    I have an intense visceral hatred of the dd/mb/yy date format, so much so that I have patched and recompiled glibc to show ISO 8601 formats for my locale. That took care of most of the problems, but Qt apps are stubbornly still showing me a dd/mm/yy short date. Is there some way of forcing apps to show yyyy-mm-dd? This is for both Qt4 and Qt5, though, of course, the Qt5 solution will become relatively more important with the passage of time. Thanks.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      Unfortunately it depends on how dates are converted inside your program. This might require a single line or a huge amount of work. Since your hatred seems widespread and not limited to a single application, the easiest way to achieve the end result might be to change your system locale date format altogether. see http://www.sysprobs.com/change-date-format-windows-7-ddmmyyyy for windows and https://ccollins.wordpress.com/2009/01/06/how-to-change-date-formats-on-ubuntu/ for linux

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      1 Reply Last reply
      0
      • 00000 Offline
        00000 Offline
        0000
        wrote on last edited by
        #3

        Did that years ago (as I mentioned patching and recompiling glibc). Works great for all of the non Qt apps, but it seems that Qt does not use standard system locale calls. Would like to do something similar for Qt (change the locale information).

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved