diff options
author | Luke Bratch <luke@bratch.co.uk> | 2015-08-10 10:00:10 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2015-08-10 10:00:10 +0100 |
commit | 5ccd72ab4e6eec04bbba314db2309bc0de380562 (patch) | |
tree | 424ebb6117d195437582e6ca31e3b13f8f04ee81 | |
parent | 91f7be2d12201a65c2c5ef78c08136744427e458 (diff) |
Provide timezone in output
-rwxr-xr-x | unixtime.bash | 6 |
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] ) ); |