From ca1ba1ad6825e93bf6be91317ffdf57d076ad798 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 26 Jun 2018 21:39:33 +1200 Subject: Use tidier format for time --- Plugin/Timezone.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Plugin/Timezone.pm') diff --git a/Plugin/Timezone.pm b/Plugin/Timezone.pm index eaea907..60a0f34 100644 --- a/Plugin/Timezone.pm +++ b/Plugin/Timezone.pm @@ -30,9 +30,10 @@ sub time { my $nick = $arguments[0]; if (grep {$_ eq $nick} @known_zones) { - my $d = DateTime->now(); + my $d = DateTime->now(); $d->set_time_zone($config{timezone}->{$nick}); - return "$requester: $nick\'s clock reads $d"; + my $timestr = $d->strftime("%Y-%m-%d %H:%M %Z"); + return "$requester: $nick\'s clock reads $timestr"; } else { return "$requester: I don't know what timezone $nick is in"; } -- cgit v1.1