diff --git a/tiny/isodate b/tiny/isodate index 0cf1c0d..3b3ec13 100755 --- a/tiny/isodate +++ b/tiny/isodate @@ -1,2 +1,14 @@ -#!/bin/sh -date '+%Y-%m-%dT%H:%M:%S' +#!/usr/bin/perl +use v5.10; +use warnings; +use strict; +use Getopt::Long; +use POSIX qw(strftime); +use Pod::Usage; +my $mssafe; +GetOptions( + "mssafe" => \$mssafe +) or pod2usage(1); + +my $fmt = $mssafe ? "%Y-%m-%dT%H-%M-%S" : "%Y-%m-%dT%H:%M:%S"; +say strftime($fmt, localtime);