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

(-)a/C4/Members.pm (-2 / +2 lines)
Lines 2302-2309 sub IssueSlip { Link Here
2302
        elsif ((substr $it->{'date_due'}, 0, 10) le $now) {
2302
        elsif ((substr $it->{'date_due'}, 0, 10) le $now) {
2303
            $it->{'overdue'} = 1;
2303
            $it->{'overdue'} = 1;
2304
        }
2304
        }
2305
2305
        my $dt = dt_from_string( $it->{'date_due'} );
2306
        $it->{'date_due'}=format_date($it->{'date_due'});
2306
        $it->{'date_due'} = output_pref( $dt );;
2307
    }
2307
    }
2308
    my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist;
2308
    my @issues = sort { $b->{'timestamp'} <=> $a->{'timestamp'} } @$issueslist;
2309
2309
(-)a/Koha/DateUtils.pm (-8 / +12 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
119
    my $time = ( C4::Context->preference('TimeFormat') eq '12hr' ) ? '%I:%M %p' : '%H:%M';
120
118
    given ($pref) {
121
    given ($pref) {
119
        when (/^iso/) {
122
        when (/^iso/) {
120
            return $dateonly
123
            return $dateonly
121
                ? $dt->strftime('%Y-%m-%d')
124
                ? $dt->strftime("%Y-%m-%d")
122
                : $dt->strftime('%Y-%m-%d %H:%M');
125
                : $dt->strftime("%Y-%m-%d $time");
123
        }
126
        }
124
        when (/^metric/) {
127
        when (/^metric/) {
125
            return $dateonly
128
            return $dateonly
126
                ? $dt->strftime('%d/%m/%Y')
129
                ? $dt->strftime("%d/%m/%Y")
127
                : $dt->strftime('%d/%m/%Y %H:%M');
130
                : $dt->strftime("%d/%m/%Y $time");
128
        }
131
        }
129
        when (/^us/) {
132
        when (/^us/) {
133
130
            return $dateonly
134
            return $dateonly
131
                ? $dt->strftime('%m/%d/%Y')
135
                ? $dt->strftime("%m/%d/%Y")
132
                : $dt->strftime('%m/%d/%Y %H:%M');
136
                : $dt->strftime("%m/%d/%Y $time");
133
        }
137
        }
134
        default {
138
        default {
135
            return $dateonly
139
            return $dateonly
136
                ? $dt->strftime('%Y-%m-%d')
140
                ? $dt->strftime("%Y-%m-%d")
137
                : $dt->strftime('%Y-%m-%d %H:%M');
141
                : $dt->strftime("%Y-%m-%d $time");
138
        }
142
        }
139
143
140
    }
144
    }
(-)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 6125-6130 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
6125
    SetVersion($DBversion);
6125
    SetVersion($DBversion);
6126
}
6126
}
6127
6127
6128
$DBversion = "3.11.00.XXX";
6129
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
6130
   $dbh->do("INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('TimeFormat','24hr','12hr|24hr','Defines the global time format for visual output.','Choice')");
6131
   print "Upgrade to $DBversion done (Add syspref TimeFormat)\n";
6132
   SetVersion ($DBversion);
6133
}
6134
6128
=head1 FUNCTIONS
6135
=head1 FUNCTIONS
6129
6136
6130
=head2 TableExists($table)
6137
=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 in
13
        - pref: TimeFormat
14
          default: 24hr
15
          choices:
16
              24hr: 24 hour format ( e.g. "14:18" )
17
              12hr: 12 hour format ( e.g. "02:18 PM" )
18
        - .
19
    -
12
        - Use
20
        - Use
13
        - pref: CalendarFirstDayOfWeek
21
        - pref: CalendarFirstDayOfWeek
14
          default: Sunday
22
          default: Sunday
15
- 

Return to bug 9014