E
E
egorttt_youtube2021-07-06 14:55:01
Python
egorttt_youtube, 2021-07-06 14:55:01

How to change the language in the time module?

Greetings, is it possible to change the language to Russian in the time module?
I get: Tue, 29 Jun 2021 - Tue, 06 Jul 2021, I would like it to be in Russian. Is it possible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ramis, 2021-07-06
@egorttt_youtube

Can

import time
import locale
locale.setlocale(locale.LC_ALL, "rus_rus")
print(time.strftime("%a, %d %b %Y %H:%M:%S"))
#Вт, 06 июл 2021 17:17:22

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question