소스 검색

Update iso8601 to output non : separated times

master
Mitch Tishmack 10 년 전
부모
커밋
bce916fbcd
1개의 변경된 파일11개의 추가작업 그리고 4개의 파일을 삭제
  1. +11
    -4
      bin.org

+ 11
- 4
bin.org 파일 보기

@@ -655,12 +655,19 @@ generally without depending on gnu date.
use strict;
use warnings;
use POSIX qw(strftime);
use Getopt::Long;

my $short = 0;
GetOptions('short' => \$short,
's' => \$short
);

my $now = time;
my $tz = strftime(('%z', (localtime $now)));
$tz =~ s/(\d{2})(\d{2})/$1:$2/smx;
my $time = strftime('%Y-%m-%dT%H:%M:%S', (localtime $now));
print "$time$tz\n";
if ($short) {
print strftime('%Y%m%dT%H%M%SZ', (gmtime $now)) . "\n";
} else {
print strftime('%Y-%m-%dT%H:%M:%SZ', (gmtime $now)) . "\n";
}
exit 0;
#+END_SRC



불러오는 중...
취소
저장