locales and date formats



  • 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.



  • 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



  • 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).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.