summaryrefslogtreecommitdiff
path: root/unixtime.bash
diff options
context:
space:
mode:
authorLuke Bratch <luke@bratch.co.uk>2015-08-10 10:00:10 +0100
committerLuke Bratch <luke@bratch.co.uk>2015-08-10 10:00:10 +0100
commit5ccd72ab4e6eec04bbba314db2309bc0de380562 (patch)
tree424ebb6117d195437582e6ca31e3b13f8f04ee81 /unixtime.bash
parent91f7be2d12201a65c2c5ef78c08136744427e458 (diff)
Provide timezone in output
Diffstat (limited to 'unixtime.bash')
-rwxr-xr-xunixtime.bash6
1 files changed, 4 insertions, 2 deletions
diff --git a/unixtime.bash b/unixtime.bash
index 1e67741..f371b0c 100755
--- a/unixtime.bash
+++ b/unixtime.bash
@@ -1,2 +1,4 @@
-#!/bin/bash
-perl -e "require 'ctime.pl'; print &ctime($1);"
+#!/usr/bin/perl
+use POSIX qw( strftime );
+
+print strftime('%a %b %e %H:%M:%S %Z %Y', localtime( $ARGV[0] ) );