From 5ccd72ab4e6eec04bbba314db2309bc0de380562 Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Mon, 10 Aug 2015 10:00:10 +0100 Subject: Provide timezone in output --- unixtime.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'unixtime.bash') 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] ) ); -- cgit v1.2.3