diff options
-rwxr-xr-x | debdate | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -160,7 +160,8 @@ class Command: self.date_options.add_argument( '-d', '--date', help='A gregorian date', - default='', + default=None, + type=parser.parse, ) self.date_options.add_argument( '-s', '--seconds', @@ -182,7 +183,7 @@ class Command: def print_date(self, args): if args.date: - date = parser.parse(args.date).date() + date = args.date.date() elif args.seconds: date = datetime.date.fromtimestamp(args.seconds) else: |