View | Details | Raw Unified | Return to bug 9014
Collapse All | Expand All

(-)a/C4/Members.pm (-2 / +2 lines)
Lines 2281-2288 sub IssueSlip { Link Here
2281
        elsif ((substr $it->{'date_due'}, 0, 10) le $now) {
2281
        elsif ((substr $it->{'date_due'}, 0, 10) le $now) {
2282
            $it->{'overdue'} = 1;
2282
            $it->{'overdue'} = 1;
2283
        }
2283
        }
2284
2284
        my $dt = dt_from_string( $it->{'date_due'} );
2285
        $it->{'date_due'}=format_date($it->{'date_due'});
2285
        $it->{'date_due'} = output_pref( $dt );;
2286
    }
2286
    }
2287
    my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist;
2287
    my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist;
2288
2288
(-)a/Koha/DateUtils.pm (-8 / +11 lines)
Lines 115-140 sub output_pref { Link Here
115
115
116
    my $pref =
116
    my $pref =
117
      defined $force_pref ? $force_pref : C4::Context->preference('dateformat');
117
      defined $force_pref ? $force_pref : C4::Context->preference('dateformat');
118
118
    given ($pref) {
119
    given ($pref) {
119
        when (/^iso/) {
120
        when (/^iso/) {
120
            return $dateonly
121
            return $dateonly
121
                ? $dt->strftime('%Y-%m-%d')
122
                ? $dt->strftime("%Y-%m-%d")
122
                : $dt->strftime('%Y-%m-%d %H:%M');
123
                : $dt->strftime("%Y-%m-%d %H:%M");
123
        }
124
        }
124
        when (/^metric/) {
125
        when (/^metric/) {
125
            return $dateonly
126
            return $dateonly
126
                ? $dt->strftime('%d/%m/%Y')
127
                ? $dt->strftime("%d/%m/%Y")
127
                : $dt->strftime('%d/%m/%Y %H:%M');
128
                : $dt->strftime("%d/%m/%Y %H:%M");
128
        }
129
        }
129
        when (/^us/) {
130
        when (/^us/) {
131
            my $time = ( C4::Context->preference('TimeFormat') eq '12hr' ) ? '%I:%M %p' : '%H:%M';
132
130
            return $dateonly
133
            return $dateonly
131
                ? $dt->strftime('%m/%d/%Y')
134
                ? $dt->strftime("%m/%d/%Y")
132
                : $dt->strftime('%m/%d/%Y %H:%M');
135
                : $dt->strftime("%m/%d/%Y $time");
133
        }
136
        }
134
        default {
137
        default {
135
            return $dateonly
138
            return $dateonly
136
                ? $dt->strftime('%Y-%m-%d')
139
                ? $dt->strftime("%Y-%m-%d")
137
                : $dt->strftime('%Y-%m-%d %H:%M');
140
                : $dt->strftime("%Y-%m-%d %H:%M");
138
        }
141
        }
139
142
140
    }
143
    }
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 386-388 INSERT INTO systempreferences (variable,value,explanation,type) VALUES('OPACdidy Link Here
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
386
INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdidyoumean',NULL,'Did you mean? configuration for the Intranet. Do not change, as this is controlled by /cgi-bin/koha/admin/didyoumean.pl.','Free');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
387
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
388
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
389
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('TimeFormat','24hr','12hr|24hr','Defines the global time format for visual output.','Choice');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 6055-6060 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6055
   SetVersion ($DBversion);
6055
   SetVersion ($DBversion);
6056
}
6056
}
6057
6057
6058
$DBversion = "3.09.00.XXX";
6059
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
6060
   $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('TimeFormat','24hr','12hr|24hr','Defines the global time format for visual output.','Choice')");
6061
   print "Upgrade to $DBversion done (Add syspref TimeFormat)\n";
6062
   SetVersion ($DBversion);
6063
}
6064
6058
=head1 FUNCTIONS
6065
=head1 FUNCTIONS
6059
6066
6060
=head2 TableExists($table)
6067
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/i18n_l10n.pref (-1 / +8 lines)
Lines 9-14 I18N/L10N: Link Here
9
              iso: yyyy-mm-dd
9
              iso: yyyy-mm-dd
10
        - .
10
        - .
11
    -
11
    -
12
        - Format times sing
13
        - pref: TimeFormat
14
          default: us
15
          choices:
16
              24hr: 24 hour format
17
              12hr: 12 hour format
18
        - .
19
    -
12
        - Use
20
        - Use
13
        - pref: CalendarFirstDayOfWeek
21
        - pref: CalendarFirstDayOfWeek
14
          default: Sunday
22
          default: Sunday
15
- 

Return to bug 9014