Browse Source

Изменён формат отображения даты

Andrew Lobanov 2 months ago
parent
commit
e98a88980a
1 changed files with 7 additions and 4 deletions
  1. 7 4
      caesium.py

+ 7 - 4
caesium.py

@@ -1,6 +1,6 @@
1 1
 #!/usr/bin/env python3
2 2
 
3
-import curses, os, urllib.request, urllib.parse, base64, codecs, pickle, time, subprocess, re, hashlib, webbrowser
3
+import curses, os, urllib.request, urllib.parse, base64, codecs, pickle, time, subprocess, re, hashlib, webbrowser, locale
4 4
 from datetime import datetime
5 5
 from shutil import copyfile
6 6
 from keys import *
@@ -559,7 +559,7 @@ def mailer(clone):
559 559
     global depth, messages
560 560
     messages = []
561 561
     print("Работа с " + nodes[node]["node"])
562
-    if nodes[node]["auth"]:
562
+    if "auth" in nodes[node]:
563 563
         make_toss()
564 564
         send_mail()
565 565
         print("Получение списка возможностей ноды...")
@@ -1469,9 +1469,9 @@ def echo_reader(echo, last, archive, favorites, out, carbonarea, drafts = False)
1469 1469
             if not(out):
1470 1470
                 try:
1471 1471
                     if width >= 80:
1472
-                        msgtime = time.strftime("%Y.%m.%d %H:%M UTC", time.gmtime(int(msg[2])))
1472
+                        msgtime = time.strftime("%d %b %Y %H:%M UTC", time.gmtime(int(msg[2])))
1473 1473
                     else:
1474
-                        msgtime = time.strftime("%Y.%m.%d %H:%M", time.gmtime(int(msg[2])))
1474
+                        msgtime = time.strftime("%d.%m.%y %H:%M", time.gmtime(int(msg[2])))
1475 1475
                 except:
1476 1476
                     msgtime = ""
1477 1477
             if bold[3]:
@@ -1918,6 +1918,9 @@ def msg_list(echoarea, msgids, msgn):
1918 1918
     else:
1919 1919
         return y + start
1920 1920
 
1921
+loc = locale.getdefaultlocale()
1922
+locale.setlocale(locale.LC_ALL, loc[0] + "." + loc[1])
1923
+
1921 1924
 check_config()
1922 1925
 reset_config()
1923 1926
 load_config()