mirror of
https://github.com/linuxboot/heads.git
synced 2025-02-20 17:22:53 +00:00
Uniformize time display so it includes timezone
date=`date "+%Y-%m-%d %H:%M:%S %Z"`
This commit is contained in:
parent
8f390f97c2
commit
9760181d09
@ -156,7 +156,7 @@ generate_totp_htop()
|
||||
update_totp()
|
||||
{
|
||||
# update the TOTP code
|
||||
date=`date "+%Y-%m-%d %H:%M:%S"`
|
||||
date=`date "+%Y-%m-%d %H:%M:%S %Z"`
|
||||
if [ "$CONFIG_TPM" = n ]; then
|
||||
TOTP="NO TPM"
|
||||
else
|
||||
@ -312,7 +312,7 @@ prompt_auto_default_boot()
|
||||
|
||||
show_main_menu()
|
||||
{
|
||||
date=`date "+%Y-%m-%d %H:%M"`
|
||||
date=`date "+%Y-%m-%d %H:%M:%S %Z"`
|
||||
whiptail $BG_COLOR_MAIN_MENU --clear --title "$MAIN_MENU_TITLE" \
|
||||
--menu "$date\nTOTP: $TOTP | HOTP: $HOTP" 20 90 10 \
|
||||
'd' ' Default boot' \
|
||||
|
@ -27,8 +27,8 @@ if [ -e /sys/class/net/eth0 ]; then
|
||||
fi
|
||||
hwclock -w
|
||||
echo "" > /dev/tty0
|
||||
echo "UTC/GMT current date and time:" > /dev/tty0
|
||||
date > /dev/tty0
|
||||
date=`date "+%Y-%m-%d %H:%M:%S %Z"`
|
||||
echo "Time: $date" > /dev/tty0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -273,7 +273,7 @@ report_integrity_measurements()
|
||||
if [ $GPG_KEY_COUNT -ne 0 ]; then
|
||||
# Check and report TOTP
|
||||
# update the TOTP code every thirty seconds
|
||||
date=`date "+%Y-%m-%d %H:%M:%S"`
|
||||
date=`date "+%Y-%m-%d %H:%M:%S %Z"`
|
||||
seconds=`date "+%s"`
|
||||
half=`expr \( $seconds % 60 \) / 30`
|
||||
if [ "$CONFIG_TPM" = n ]; then
|
||||
@ -320,7 +320,7 @@ report_integrity_measurements()
|
||||
fi
|
||||
|
||||
#Show results
|
||||
whiptail $MAIN_MENU_BG_COLOR --clear --title "Measured Integrity Report" --msgbox "Time (GMT/UTC timezone): $date\nTOTP: $TOTP | HOTP: $HOTP\n/BOOT INTEGRITY: $HASH\n\nPress OK to continue or Ctrl+Alt+Delete to reboot" 30 90
|
||||
whiptail $MAIN_MENU_BG_COLOR --clear --title "Measured Integrity Report" --msgbox "$date\nTOTP: $TOTP | HOTP: $HOTP\n/BOOT INTEGRITY: $HASH\n\nPress OK to continue or Ctrl+Alt+Delete to reboot" 30 90
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user