projects
/
clearscm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed long standing bug with hit_count
[clearscm.git]
/
maps
/
bin
/
MAPSUtil.pm
diff --git
a/maps/bin/MAPSUtil.pm
b/maps/bin/MAPSUtil.pm
index
2298d77
..
82f7bc7
100644
(file)
--- a/
maps/bin/MAPSUtil.pm
+++ b/
maps/bin/MAPSUtil.pm
@@
-17,6
+17,10
@@
package MAPSUtil;
use strict;
use vars qw (@ISA @EXPORT);
use strict;
use vars qw (@ISA @EXPORT);
+BEGIN {
+ $ENV{TZ}='America/Los_Angeles';
+} # BEGIN
+
@ISA = qw (Exporter);
@EXPORT = qw (
@ISA = qw (Exporter);
@EXPORT = qw (
@@
-33,15
+37,18
@@
sub Today2SQLDatetime;
sub FormatDate {
my ($date) = @_;
sub FormatDate {
my ($date) = @_;
- return substr
$date, 5, 2
. '/' .
- substr
$date, 8, 2
. '/' .
- substr
$date, 0, 4
;
+ return substr
($date, 5, 2)
. '/' .
+ substr
($date, 8, 2)
. '/' .
+ substr
($date, 0, 4)
;
} # FormatDate
sub FormatTime {
my ($time) = @_;
my $hours = substr $time, 0, 2;
} # FormatDate
sub FormatTime {
my ($time) = @_;
my $hours = substr $time, 0, 2;
+
+ $hours = substr $hours, 1, 1 if $hours < 10;
+
my $minutes = substr $time, 3, 2;
my $seconds = substr $time, 6, 2;
my $AmPm = $hours > 12 ? 'Pm' : 'Am';
my $minutes = substr $time, 3, 2;
my $seconds = substr $time, 6, 2;
my $AmPm = $hours > 12 ? 'Pm' : 'Am';
@@
-141,9
+148,9
@@
sub SubtractDays {
$month = '0' . $month;
} # if
$month = '0' . $month;
} # if
- # Prefix days with
0 if necessary
- if ($days
eq
0) {
-
$days = '01';
+ # Prefix days with 0 if necessary
+ if ($days
==
0) {
+ $days = '01';
} elsif ($days < 10) {
$days = '0' . $days;
} # if
} elsif ($days < 10) {
$days = '0' . $days;
} # if