Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def build_list_mtime(st_mtime, now=None):
if now is None:
now = time.time()
mtime = time.localtime(st_mtime)
with setlocale("C"):
if now - HALF_OF_YEAR_IN_SECONDS < st_mtime <= now:
s = time.strftime("%b %e %H:%M", mtime)
else:
s = time.strftime("%b %e %Y", mtime)
return s