<div dir="ltr">
<p style="margin:0px;white-space:pre-wrap">Reginald,</p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">Using QT:<br></p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">locale = QLocale(QLocale.Japanese)</p>
<p style="margin:0px;white-space:pre-wrap">locale.toString(QDate.currentDate())</p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">And, if you want to use the same settings that you set in QGIS, just use the default locale:</p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap"></p><p style="margin:0px">locale = QLocale() # Default locale from QGIS options/settings
</p><p style="margin:0px">locale.toString(QDate.currentDate())</p><p style="margin:0px"></p><br><p></p>
<p style="margin:0px;white-space:pre-wrap"><br></p><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 9, 2018 at 8:54 AM, Reginald Carlier <span dir="ltr"><<a href="mailto:Reginald.Carlier@ingelmunster.be" target="_blank">Reginald.Carlier@ingelmunster.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="NL-BE">
<div class="m_5261481370332348146WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US">I forgot to mention that I import datetime as follows:<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US">from datetime import datetime<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US">In the console I get the same result as from my script.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US">Maybe I should use QCoreApplication.translate or some other explicit way to tell python to translate a string from English to Dutch?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US">Regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Tahoma","sans-serif";color:#1f497d" lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="NL"><span class=""></span></span></b></p><div><table style="width:100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0"><td style="vertical-align:top" align="left"><table style="width:100%;font-size:0" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0"><td style="padding:5px 0;vertical-align:top" align="left"><table style="width:100%;font-size:0" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0"><td style="vertical-align:top" align="left"><table style="font-size:0;color:#5c676d;font-style:normal;font-weight:400;white-space:nowrap" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:14.67px"><td style="padding:2px 0;vertical-align:top;font-family:Tahoma" align="left">Reginald Carlier<span style="font-family:remialcxesans"></span></td></tr></tbody></table></td></tr><tr style="font-size:0"><td style="vertical-align:top" align="left"><table style="font-size:0;color:#5c676d;font-style:normal;font-weight:400;white-space:nowrap" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:13.33px"><td style="padding:2px 0;vertical-align:top;font-family:Tahoma" align="left">Deskundige GIS</td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="font-size:0"><td style="vertical-align:top" align="left"><table style="font-size:0;line-height:normal" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0"><td style="padding:3px 0;vertical-align:top" align="left"><a href="https://www.ingelmunster.be/" id="m_5261481370332348146LPlnk689713" style="text-decoration:none" target="_blank"><img alt="" style="height:65px;min-height:65px;max-height:65px;font-size:0" height="65" border="0"></a></td></tr></tbody></table></td></tr><tr style="font-size:0"><td style="vertical-align:top" align="left"><table style="font-size:0" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0"><td style="padding:2px 0;vertical-align:top" align="left"><table style="font-size:0;color:#5c676d;font-style:normal;font-weight:400;white-space:nowrap" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:12px"><td style="vertical-align:top;font-family:Tahoma" align="left">Gemeente Ingelmunster</td><td style="vertical-align:top;font-family:Tahoma" align="left">, </td><td style="vertical-align:top;font-family:Tahoma" align="left">Oostrozebekestraat 4</td><td style="vertical-align:top;font-family:Tahoma" align="left">, </td><td style="vertical-align:top;font-family:Tahoma" align="left">8770</td><td style="vertical-align:top;font-family:Tahoma" align="left"> </td><td style="vertical-align:top;font-family:Tahoma" align="left">Ingelmunster</td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="font-size:0"><td style="vertical-align:top" align="left"><table style="font-size:0" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0"><td style="padding:2px 0;vertical-align:top" align="left"><table style="font-size:0;color:#5c676d;font-style:normal;font-weight:400;white-space:nowrap" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:12px"><td style="vertical-align:top;font-family:Tahoma" align="left">T</td><td style="vertical-align:top;font-family:Tahoma" align="left"><a href="tel:+32%2051%2033%2074%2039" id="m_5261481370332348146LPlnk689713" style="text-decoration:none;color:#5c676d" target="_blank"><strong style="font-weight:400">+32 51 33 74 39</strong></a></td><td style="vertical-align:top;font-size:0" align="left"><table style="font-size:0;color:#5c676d;font-style:normal;font-weight:400;white-space:nowrap" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:12px"><td style="padding:0 0 0 5px;vertical-align:top;font-family:Tahoma" align="left"><a href="http://www.ingelmunster.be/" id="m_5261481370332348146LPlnk689713" title="Website Ingelmunster" style="text-decoration:none;color:#5c676d" target="_blank"><strong style="font-weight:400">www.ingelmunster.be</strong></a></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="font-size:0"><td style="vertical-align:top" align="left"><table style="font-size:0" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0"><td style="padding:4px 0 2px;vertical-align:top" align="left"><table style="font-size:0;line-height:normal" cellspacing="0" cellpadding="0" border="0"><tbody><tr style="font-size:0"><td style="vertical-align:top" align="left"><a href="https://www.facebook.com/Ingelmunster/" id="m_5261481370332348146LPlnk689713" style="text-decoration:none" target="_blank"><img title="Facebook" alt="Facebook" style="height:19px;min-height:19px;max-height:19px;font-size:12px" height="19" border="0"></a></td><td style="vertical-align:top" align="left"><a href="https://www.instagram.com/ingelmunster/" id="m_5261481370332348146LPlnk689713" style="text-decoration:none" target="_blank"><img title="instagram" alt="instagram" style="height:19px;min-height:19px;max-height:19px;font-size:12px" height="19" border="0"></a></td><td style="vertical-align:top" align="left"><a href="https://www.pinterest.com/ingelmunster/" id="m_5261481370332348146LPlnk689713" style="text-decoration:none" target="_blank"><img title="pinterest" alt="pinterest" style="height:19px;min-height:19px;max-height:19px;font-size:12px" height="19" border="0"></a></td><td style="vertical-align:top" align="left"><a href="https://twitter.com/ingelmunster" id="m_5261481370332348146LPlnk689713" style="text-decoration:none" target="_blank"><img title="twitter" alt="twitter" style="height:19px;min-height:19px;max-height:19px;font-size:12px" height="19" border="0"></a></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr style="color:#000001;font-size:9px;font-style:normal;font-weight:400;white-space:nowrap"><td style="vertical-align:top;font-family:Tahoma" align="left"><a href="http://www.ingelmunster.be/email-disclaimer.html" id="m_5261481370332348146LPlnk689713" title="disclaimer" style="text-decoration:none;color:#5c676d" target="_blank"><strong style="font-weight:400">Raadpleeg onze disclaimer </strong></a></td></tr></tbody></table></div><b>Van:</b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"" lang="NL"> Nyall Dawson [via OSGeo.org] [mailto:<a href="mailto:ml%2Bs1560n5373899h69@n6.nabble.com" target="_blank">ml+s1560n5373899h69@<wbr>n6.nabble.com</a>]
<br>
<b>Verzonden:</b> donderdag 9 augustus 2018 8:43<br>
<b>Aan:</b> Reginald Carlier<br>
<b>Onderwerp:</b> Re: localisation of date fails in QGIS 3.2<u></u><u></u></span><p></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span class="">On Thu, 9 Aug 2018 at 16:39, Reginald Carlier <br></span>
<<a href="http:///user/SendEmail.jtp?type=node&node=5373899&i=0" target="_blank">[hidden email]</a>> wrote:
<u></u><u></u></p><span class="">
<div>
<p class="MsoNormal"><br>
> <br>
> Hi Nyall, <br>
> <br>
> Somehow my post shows the code but my previous post doesn't. <br>
> Anyway this is how the code looks: <br>
> <br>
> vandaag = datetime.now() <br>
> dag = vandaag.day <br>
> maand = vandaag.strftime("%B") <br>
> jaar = vandaag.year <br>
> datum = str(dag) + " " + maand + " " + str(jaar) <br>
> <br>
> I suspect that maybe strftime changed in python 3.6? <u></u><u></u></p>
</div>
</span><p class="MsoNormal" style="margin-bottom:12.0pt"><span class=""><br>
Do you see the same from a standalone python console? (I'm not sure <br>
that this issue is related to QGIS at all or whether it's a Python <br>
specific thing). <br>
<br>
Nyall <br>
______________________________<wbr>_________________ <br>
Qgis-user mailing list <br>
</span><a href="http:///user/SendEmail.jtp?type=node&node=5373899&i=1" target="_blank">[hidden email]</a>
<br><span class="">
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">
https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a> <u></u><u></u></span></p>
<div class="MsoNormal" style="text-align:center" align="center">
<hr style="color:#cccccc" width="100%" size="1" noshade align="center">
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444">If you reply to this email, your message will be added to the discussion below:<u></u><u></u></span></b></p>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444"><a href="http://osgeo-org.1560.x6.nabble.com/localisation-of-date-fails-in-QGIS-3-2-tp5372703p5373899.html" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/localisation-of-<wbr>date-fails-in-QGIS-3-2-<wbr>tp5372703p5373899.html</a>
<u></u><u></u></span></p>
</div>
<div style="margin-top:4.8pt">
<p class="MsoNormal" style="line-height:18.0pt"><span style="font-size:8.5pt;font-family:"Tahoma","sans-serif";color:#666666">To start a new topic under QGIS - User, email <a href="mailto:ml%2Bs1560n4125267h77@n6.nabble.com" target="_blank">ml+s1560n4125267h77@n6.nabble.<wbr>com</a>
<br>
To unsubscribe from QGIS, <a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4099105&code=UmVnaW5hbGQuQ2FybGllckBpbmdlbG11bnN0ZXIuYmV8NDA5OTEwNXw3OTAxNjMzMzQ=" target="_blank">
click here</a>.<br>
<a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" target="_blank"><span style="font-size:7.0pt;font-family:"Times New Roman","serif"">NAML</span></a>
<u></u><u></u></span></p>
</div>
</div>
</div>
<br>______________________________<wbr>_________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-user</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div>