]> git.donarmstrong.com Git - bin.git/blobdiff - make_invoice
use the right timezone in make_invoice
[bin.git] / make_invoice
index bce9c8aa4a9d083fc805be2a4fd7f92b6e67ac02..d8cf50f12e3a037ffe73808d6bdca8213c9f77c2 100755 (executable)
@@ -85,7 +85,7 @@ Display this manual.
 use vars qw($DEBUG);
 
 use Date::Manip;
-use POSIX qw(ceil);
+use POSIX qw(ceil strftime);
 use Cwd qw(cwd);
 use Text::Template;
 
@@ -270,8 +270,8 @@ if ($options{svn}) {
 
 sub format_events{
      my ($date,$date2,$time,@events) = @_;
-     my $output = '        \Fee{'.UnixDate($date,'%A, %B %e, %H:%M').
-         ' to '.UnixDate($date2,'%H:%M %Z')."\n".
+     my $output = '        \Fee{'.strftime('%A, %B %e, %H:%M',localtime(UnixDate($date,'%s'))).
+         ' to '.strftime('%H:%M %Z',localtime(UnixDate($date2,'%s')))."\n".
          '         \begin{itemize*}'."\n";
      $output .= join('',map {"           \\item $_\n"} @events);
      $output .= '         \end{itemize*}}{50.00}{'.$time.'}'."\n";