blob: 8ea9446af7e9d82a9ba8a39d804a4a6695eea7ff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/env python3
from datetime import datetime
import sys
def help():
print(sys.argv[0] + " YYYY-MM-DD-HHMMSS [+XXXX]")
# test
#indate = "2022-12-22-182343"
timezone = "+0000"
if len(sys.argv) <= 1:
print("error no arg")
help()
sys.exit()
if len(sys.argv) == 3:
timezone = sys.argv[2]
if len(sys.argv) > 3:
print("error > 2 args")
help()
sys.exit()
indate = sys.argv[1]
d = datetime.strptime(indate, "%Y-%m-%d-%H%M%S")
print(d.strftime("%a, %d %b %Y %H:%M:%S") + " " + timezone)
|
in each repos: see "about"-tab (if existing) for more details / README.
dark theme is a modded version of: https://gist.github.com/Yoplitein/f4b671a2ec70c9e743fa