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 388-390 INSERT INTO systempreferences (variable, value, options, explanation, type) VALU Link Here
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,explanation,options,type) VALUES('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z','Alphabet than can be expanded into browse links, e.g. on Home > Patrons',NULL,'free');
389
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z','Alphabet than can be expanded into browse links, e.g. on Home > Patrons',NULL,'free');
390
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.', NULL, 'YesNo');
390
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.', NULL, 'YesNo');
391
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 6113-6118 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
6113
    SetVersion($DBversion);
6113
    SetVersion($DBversion);
6114
}
6114
}
6115
6115
6116
$DBversion = "3.11.00.XXX";
6117
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
6118
   $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('TimeFormat','24hr','12hr|24hr','Defines the global time format for visual output.','Choice')");
6119
   print "Upgrade to $DBversion done (Add syspref TimeFormat)\n";
6120
   SetVersion ($DBversion);
6121
}
6122
6116
=head1 FUNCTIONS
6123
=head1 FUNCTIONS
6117
6124
6118
=head2 TableExists($table)
6125
=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