[Qgis-user] localisation of date fails in QGIS 3.2

Reginald Carlier Reginald.Carlier at ingelmunster.be
Wed Aug 8 23:39:49 PDT 2018


Hi Nyall,

Somehow my post shows the code but my previous post doesn't.
Anyway this is how the code looks:

vandaag = datetime.now() 
dag = vandaag.day 
maand = vandaag.strftime("%B") 
jaar = vandaag.year 
datum = str(dag) + " " +  maand + " " + str(jaar)

I suspect that maybe strftime changed in python 3.6?

Regards,


Reginald Carlier
Deskundige GIS
Gemeente Ingelmunster, Oostrozebekestraat 4, 8770 Ingelmunster
T+32 51 33 74 39www.ingelmunster.be
Raadpleeg onze disclaimer 
-----Oorspronkelijk bericht-----
Van: Nyall Dawson [mailto:nyall.dawson at gmail.com] 
Verzonden: donderdag 9 augustus 2018 8:36
Aan: Reginald Carlier
CC: qgis-user
Onderwerp: Re: [Qgis-user] localisation of date fails in QGIS 3.2

On Mon, 30 Jul 2018 at 19:22, Reginald <Reginald.Carlier at ingelmunster.be> wrote:
>
> Hi,
>
> I have a script that was adapted to python 3.6 and runs fine on QGIS 3.2.
> The problem I'm having is that the date shows up in english.
> Under Extra > Options > Algemeen i have:
> Vertaling gebruikers-interface --> Nederlands
> Locale Dutch Belgium (nl_BE)
>
> Also if I choose for "Systeemlocale negeren" (ignore system locale) I still
> get the date in english.
> My code looks like this and works fine in QGIS 2.18:
>
>

I think you forgot to include the code? Can you re-share?

Nyall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20180809/afcd7672/attachment.html>


More information about the Qgis-user mailing list