Force C locale for sky offset decimal point

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015HtPHsTnDcLVSCiF5FGHZj
This commit is contained in:
vini 2026-07-19 21:42:33 -03:00
parent 2ceb5df442
commit 2779cb2bb9

View file

@ -13,6 +13,6 @@ fi
target_epoch=$(date -d "today $TARGET" +%s) || exit 2 target_epoch=$(date -d "today $TARGET" +%s) || exit 2
now_epoch=$(date +%s) now_epoch=$(date +%s)
offset_h=$(awk "BEGIN { printf \"%.4f\", ($target_epoch - $now_epoch) / 3600 }") offset_h=$(LC_ALL=C awk "BEGIN { printf \"%.4f\", ($target_epoch - $now_epoch) / 3600 }")
printf '%s\n' "$offset_h" > "$STATE_FILE" printf '%s\n' "$offset_h" > "$STATE_FILE"
printf 'Relógio do céu em %s de hoje (offset %sh)\n' "$TARGET" "$offset_h" printf 'Relógio do céu em %s de hoje (offset %sh)\n' "$TARGET" "$offset_h"