changeset 274:2590bcd517a5

added time information in output
author "Rex Tsai <chihchun@kalug.linux.org.tw>"
date Mon, 01 Dec 2008 20:54:23 +0800
parents f81c4f9d267f
children c1333052a4ed
files enemy.pl
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/enemy.pl	Mon Dec 01 14:23:08 2008 +0800
+++ b/enemy.pl	Mon Dec 01 20:54:23 2008 +0800
@@ -3,6 +3,7 @@
 use Ikariam;
 use Data::Dumper;
 use YAML qw/LoadFile/;
+use POSIX qw(strftime);
 
 package main;
 my @tradegoodText = qw/NULL 葡萄酒 大理石 水晶 硫磺/;
@@ -96,6 +97,7 @@
     foreach my $i (qw/name score trader_score_secondary army_score_main ally/) {
         printf("%s: %s\n", $i, $u->get($i));
     }
+    printf("time: %s\n",  strftime ("%Y-%m-%d %H:%M", localtime($u->get('time'))));
 
     travelMatrix($ARGV[0]);