nextcloud/all-in-one · warning · InvalidSettingConfigurationException
You did not enter a correct time! One correct example is '04
Error message
You did not enter a correct time! One correct example is '04:00'!
What it means
Thrown by setDailyBackupTime when the time string matches neither ^[0-1][0-9]:[0-5][0-9]$ nor ^2[0-3]:[0-5][0-9]$, i.e. anything but a valid 24-hour HH:MM between 00:00 and 23:59. Leading zeros and two-digit hours are mandatory.
Source
Thrown at php/src/Data/ConfigurationManager.php:908
public function getCollaboraSeccompPolicy() : string {
$defaultString = '--o:security.seccomp=';
if (!$this->collaboraSeccompDisabled) {
return $defaultString . 'true';
}
return $defaultString . 'false';
}
/**
* @throws InvalidSettingConfigurationException
*/
public function setDailyBackupTime(string $time, bool $enableAutomaticUpdates, bool $successNotification) : void {
if ($time === "") {
throw new InvalidSettingConfigurationException("The daily backup time must not be empty!");
}
if (!preg_match("#^[0-1][0-9]:[0-5][0-9]$#", $time) && !preg_match("#^2[0-3]:[0-5][0-9]$#", $time)) {
throw new InvalidSettingConfigurationException("You did not enter a correct time! One correct example is '04:00'!");
}
if ($enableAutomaticUpdates === false) {
$time .= PHP_EOL . 'automaticUpdatesAreNotEnabled';
} else {
$time .= PHP_EOL;
}
if ($successNotification === false) {
$time .= PHP_EOL . 'successNotificationsAreNotEnabled';
} else {
$time .= PHP_EOL;
}
file_put_contents(DataConst::GetDailyBackupTimeFile(), $time);
$this->dailyBackupFileCache = '';
$this->dailyBackupFileMtime = 0;
}
private function getDailyBackupFileContent() : string {View on GitHub (pinned to 6b788eec5e)
Solutions
- Use a strict 24-hour HH:MM string with leading zeros, e.g. '04:00'.
- In scripts, format with zero-padding before sending.
- For midnight use '00:00', never '24:00'.
Example fix
// before
$time = '4:00';
// after
$time = sprintf('%02d:%02d', 4, 0); // '04:00' Defensive patterns
Strategy: validation
Validate before calling
if (!preg_match('#^([01]\d|2[0-3]):[0-5]\d$#', $dailyBackupTime)) {
// reject before calling setDailyBackupTime()
} Prevention
- Use an HTML <input type="time"> or zero-padded 24h formatting on the client.
- Generate times with sprintf('%02d:%02d', $h, $m).
When it happens
Trigger: Submitting '4:00' (missing leading zero), '24:00' (invalid hour), '04:0' or '0400' (format), '04:60' (invalid minute), or a time with seconds like '04:00:00'.
Common situations: 12-hour clocks with AM/PM ('4:00 AM'); locales that format times differently; scripts generating times without sprintf('%02d:%02d', ...); users entering midnight as '24:00' instead of '00:00'.
Related errors
- The daily backup time must not be empty!
- You entered unallowed characters! Problematic is ${entry}
- Domain must contain at least one dot!
- Domain must not contain slashes!
- Domain must not contain colons!
AI-assisted analysis of nextcloud/all-in-one@6b788eec5e (2026-08-21).
Data as JSON: /api/errors/9d2089f98169e4a9.
Report an issue: GitHub.