Skip to content

Commit d527870

Browse files
authored
Update sample code for the argparse article
1 parent fa659a8 commit d527870

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python-argparse/ls_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
def build_output(entry, long=False):
2121
if long:
2222
size = entry.stat().st_size
23-
date = datetime.date.fromtimestamp(entry.stat().st_mtime).strftime(
24-
"%b %d %m:%S"
23+
date = datetime.datetime.fromtimestamp(entry.stat().st_mtime).strftime(
24+
"%b %d %M:%S"
2525
)
2626
return f"{size:>6d} {date} {entry.name}"
2727
return entry.name

0 commit comments

Comments
 (0)