bug fixes
This commit is contained in:
parent
5bdbb28e31
commit
9b4965d591
@ -488,7 +488,7 @@ def main():
|
||||
print('Toxygen v' + program_version)
|
||||
return
|
||||
elif arg == '--help':
|
||||
print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version')
|
||||
print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version\ntoxygen --reset')
|
||||
return
|
||||
elif arg == '--configure':
|
||||
configure()
|
||||
|
@ -37,7 +37,7 @@ def remove(folder):
|
||||
|
||||
|
||||
def convert_time(t):
|
||||
offset = time.timezone - time.daylight * 3600
|
||||
offset = time.timezone + time_offset() * 3600
|
||||
sec = int(t) - offset
|
||||
m, s = divmod(sec, 60)
|
||||
h, m = divmod(m, 60)
|
||||
@ -45,6 +45,15 @@ def convert_time(t):
|
||||
return '%02d:%02d' % (h, m)
|
||||
|
||||
|
||||
def time_offset():
|
||||
hours = time.strftime('%H')
|
||||
sec = int(time.time()) - time.timezone
|
||||
m, s = divmod(sec, 60)
|
||||
h, m = divmod(m, 60)
|
||||
d, h = divmod(h, 24)
|
||||
return int(hours) - h
|
||||
|
||||
|
||||
def append_slash(s):
|
||||
if len(s) and s[-1] not in ('\\', '/'):
|
||||
s += '/'
|
||||
|
Loading…
Reference in New Issue
Block a user