RamsLessonsLearnt

Friday, December 17, 2021

Python strptime Polish month discrepency between Linux and Windows

 very similar to the russian issue 

We have discrepancy in Polish between Linux and Windows

Run this command in both Linux and WIndows version 


import locale

import datetime

locale.setlocale(locale.LC_ALL, "pl_PL")

datetime.datetime.strptime('2021-grudnia-17','%Y-%B-%d')  #works only in Linux

datetime.datetime.strptime('2021-Grudzień-17','%Y-%B-%d') #works only in Winods 

Posted by Ramachandran at 1:53 AM No comments:
Labels: datetime, locale, python
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

About Me

Ramachandran
A Software Professional who loves to write
View my complete profile

Blog Archive

  • ▼  2021 (4)
    • ▼  December (1)
      • Python strptime Polish month discrepency between ...
    • ►  October (2)
    • ►  August (1)
  • ►  2016 (2)
    • ►  July (1)
    • ►  June (1)
  • ►  2013 (4)
    • ►  April (4)
  • ►  2012 (1)
    • ►  December (1)
  • ►  2011 (3)
    • ►  July (1)
    • ►  February (2)
  • ►  2010 (8)
    • ►  November (1)
    • ►  September (1)
    • ►  June (1)
    • ►  April (4)
    • ►  February (1)
  • ►  2009 (13)
    • ►  September (5)
    • ►  July (4)
    • ►  April (2)
    • ►  February (1)
    • ►  January (1)
  • ►  2008 (24)
    • ►  December (7)
    • ►  October (3)
    • ►  July (3)
    • ►  June (1)
    • ►  May (1)
    • ►  April (3)
    • ►  February (3)
    • ►  January (3)
  • ►  2007 (31)
    • ►  December (4)
    • ►  November (12)
    • ►  October (1)
    • ►  September (8)
    • ►  July (6)
Simple theme. Powered by Blogger.