26May05
- Fix compile problem of ua_restore.c on broken compilers.
- Apply patch from bug 326 to permit bacula status by any user.
+- Fix bug 325 -- conversion of 12:30pm to 24hour time.
25May05
- Put Dmsg() on inside if() to avoid calling subroutine.
- Make restore.bsr have unique name.
Copyright (C) 2000-2005 Kern Sibbald
This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License, or (at your option) any later version.
+ modify it under the terms of the GNU General Public License
+ version 2 as ammended with additional clauses defined in the
+ file LICENSE in the main source directory.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public
- License along with this program; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- MA 02111-1307, USA.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ the file LICENSE for additional details.
*/
/* NOT REACHED */
}
*p++ = 0; /* separate two halves */
- code = atoi(lc->str);
+ code = atoi(lc->str); /* pick up hour */
len = strlen(p);
if (len > 2 && p[len-1] == 'm') {
if (p[len-2] == 'a') {
} else {
pm = 0;
}
- code2 = atoi(p);
+ code2 = atoi(p); /* pick up minutes */
if (pm) {
- code += 12;
+ /* Convert to 24 hour time */
+ if (code == 12) {
+ code -= 12;
+ } else {
+ code += 12;
+ }
}
if (code < 0 || code > 23 || code2 < 0 || code2 > 59) {
scan_err0(lc, _("Bad time specification."));
/* NOT REACHED */
}
- /****FIXME**** convert to UTC */
set_bit(code, lrun.hour);
lrun.minute = code2;
have_hour = true;