Use d/m/Y H:i:s date format for all user-facing timestamps

Update log lines, email notifications, generated config comments,
and WHM logs page. Structural dates (filenames, snapshot dirs,
.complete markers) are unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shuki
2026-03-05 07:35:49 +02:00
parent 19368ee2c6
commit 0fb640d585
4 changed files with 6 additions and 6 deletions

View File

@@ -1083,7 +1083,7 @@ _schedule_add() {
cat > "$config_file" <<CONF
# gniza schedule config: $name
# Generated by 'gniza schedule add $name'
# $(date -u +"%Y-%m-%d %H:%M:%S UTC")
# $(date -u +"%d/%m/%Y %H:%M:%S UTC")
SCHEDULE="$sched_type"
SCHEDULE_TIME="$sched_time"
@@ -1215,7 +1215,7 @@ cmd_init() {
mkdir -p "$config_dir/remotes.d"
cat > "$config_file" <<CONF
# gniza configuration — generated by 'gniza init'
# $(date -u +"%Y-%m-%d %H:%M:%S UTC")
# $(date -u +"%d/%m/%Y %H:%M:%S UTC")
#
# Remote destinations are configured in /etc/gniza/remotes.d/<name>.conf
# Run 'gniza init remote <name>' to add one.
@@ -1299,7 +1299,7 @@ _init_remote() {
cat > "$config_file" <<CONF
# gniza remote config: $name
# Generated by 'gniza init remote $name'
# $(date -u +"%Y-%m-%d %H:%M:%S UTC")
# $(date -u +"%d/%m/%Y %H:%M:%S UTC")
REMOTE_HOST="$init_host"
REMOTE_PORT=$init_port

View File

@@ -35,7 +35,7 @@ _log() {
(( level_num < configured_num )) && return 0
local ts; ts=$(date -u +"%Y-%m-%d %H:%M:%S")
local ts; ts=$(date -u +"%d/%m/%Y %H:%M:%S")
local upper; upper=$(echo "$level" | tr '[:lower:]' '[:upper:]')
local line="[$ts] [$upper] $msg"

View File

@@ -155,7 +155,7 @@ send_backup_report() {
body+="Backup Report: $status"$'\n'
body+="=============================="$'\n'
body+="Hostname: $(hostname -f)"$'\n'
body+="Timestamp: $(date -u +"%Y-%m-%d %H:%M:%S UTC")"$'\n'
body+="Timestamp: $(date -u +"%d/%m/%Y %H:%M:%S UTC")"$'\n'
body+="Duration: $(human_duration "$duration")"$'\n'
body+=""$'\n'
body+="Accounts: $total total, $succeeded succeeded, $failed failed"$'\n'

View File

@@ -348,7 +348,7 @@ sub _format_time {
my ($epoch) = @_;
return '' unless $epoch;
my @t = localtime($epoch);
return sprintf('%04d-%02d-%02d %02d:%02d', $t[5]+1900, $t[4]+1, $t[3], $t[2], $t[1]);
return sprintf('%02d/%02d/%04d %02d:%02d:%02d', $t[3], $t[4]+1, $t[5]+1900, $t[2], $t[1], $t[0]);
}
sub _human_size {