@@ -11,7 +11,7 @@ def print_help():
11
11
print ('[+] use --cm to get the time of common timezones around the world.' )
12
12
print ('[+] use --cmp and pass two \' -\' seperated timezones to compare.' )
13
13
print ('[+] use --help again if needed.' )
14
- print ('\n ' + '-' * 50 + '\n ' )
14
+ print ('\n ' + '-' * 50 + '\n ' )
15
15
16
16
17
17
# --- GET DATETIME OF PASSED TIMEZONE ---
@@ -24,14 +24,14 @@ def get_datetime(time_zone):
24
24
# --- GET DATETIME OF CUSTOM TIMEZONE ---
25
25
def get_custom_tz (time_zone ):
26
26
response = str (get_datetime (time_zone ))
27
- print (f'%20s' % 'Timezone' + ' :' + ' ' * 2 + time_zone )
27
+ print (f'%20s' % 'Timezone' + ' :' + ' ' * 2 + time_zone ) # noqa
28
28
date , time = response .split (' ' )
29
29
hours , minutes , seconds = time .split (':' )
30
- print ('%20s' % 'Hours' + ' :' + ' ' * 2 + hours )
31
- print ('%20s' % 'Minutes' + ' :' + ' ' * 2 + minutes )
32
- print ('%20s' % 'Seconds' + ' :' + ' ' * 2 + seconds )
33
- print ('%20s' % 'Date' + ' :' + ' ' * 2 + date )
34
- print ('\n ' + '-' * 50 + '\n ' )
30
+ print ('%20s' % 'Hours' + ' :' + ' ' * 2 + hours )
31
+ print ('%20s' % 'Minutes' + ' :' + ' ' * 2 + minutes )
32
+ print ('%20s' % 'Seconds' + ' :' + ' ' * 2 + seconds )
33
+ print ('%20s' % 'Date' + ' :' + ' ' * 2 + date )
34
+ print ('\n ' + '-' * 50 + '\n ' )
35
35
36
36
37
37
# --- GET DATETIMES OF COMMON TIMEZONES ---
@@ -63,14 +63,14 @@ def get_comparisons(tz_1, tz_2):
63
63
print ('%25s' % 'Hours :' , offset .hours )
64
64
print ('%25s' % 'Minutes :' , offset .minutes )
65
65
print ('%25s' % 'Seconds :' , offset .seconds )
66
- print ('\n ' + '-' * 50 + '\n ' )
66
+ print ('\n ' + '-' * 50 + '\n ' )
67
67
68
68
69
69
# --- MAIN FUNCTION ---
70
70
def Main ():
71
- print ('\n ' + '-' * 50 + '\n ' )
72
- print (' ' * 16 + 'TIMEZONE TOOL' )
73
- print ('\n ' + '-' * 50 + '\n ' )
71
+ print ('\n ' + '-' * 50 + '\n ' )
72
+ print (' ' * 16 + 'TIMEZONE TOOL' )
73
+ print ('\n ' + '-' * 50 + '\n ' )
74
74
75
75
# --- SET DEFAULTS ---
76
76
argument_list = sys .argv [1 :]
@@ -92,11 +92,12 @@ def Main():
92
92
if len (timezones ) == 2 :
93
93
get_comparisons (timezones [0 ], timezones [1 ])
94
94
else :
95
- print (' ' * 5 , '[+] Seperate the Timezones with \' -\' ' )
96
- print ('\n ' + '-' * 50 + '\n ' )
95
+ print (' ' * 5 , '[+] Seperate the Timezones with \' -\' ' )
96
+ print ('\n ' + '-' * 50 + '\n ' )
97
97
98
98
except getopt .error as error :
99
99
print (str (error ))
100
100
101
+
101
102
if __name__ == '__main__' :
102
103
Main ()
0 commit comments