]> err.no Git - util-linux/commitdiff
Use RFC2822 output format for date messages from hwclock.sh
authorTollef Fog Heen <tfheen@err.no>
Fri, 25 Feb 2011 13:10:13 +0000 (14:10 +0100)
committerTollef Fog Heen <tfheen@err.no>
Fri, 25 Feb 2011 13:10:13 +0000 (14:10 +0100)
Make sure we output unambigous dates

Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=321862

debian/hwclock.sh

index 088867f35f99c10083eccc8c9c0545888268de6e..603ad40d3aebb92bedfeb3e224abb49f82c94b84 100644 (file)
@@ -115,9 +115,9 @@ hwclocksh()
                # timezone. DO NOT REMOVE.
                if /sbin/hwclock --rtc=/dev/$HCTOSYS_DEVICE --hctosys $GMT $HWCLOCKPARS $BADYEAR $NOADJ; then
                    #   Announce the local time.
-                   verbose_log_action_msg "System Clock set to: `date $UTC`"
+                   verbose_log_action_msg "System Clock set to: `date --rfc-2822 $UTC`"
                else
-                   log_warning_msg "Unable to set System Clock to: `date $UTC`"
+                   log_warning_msg "Unable to set System Clock to: `date --rfc-2822 $UTC`"
                fi
            else
                verbose_log_action_msg "Not setting System Clock"
@@ -143,7 +143,7 @@ hwclocksh()
                    GMT="--utc"
                fi
                if /sbin/hwclock --rtc=/dev/$HCTOSYS_DEVICE --systohc $GMT $HWCLOCKPARS $BADYEAR $NOADJ; then
-                   verbose_log_action_msg "Hardware Clock updated to `date`"
+                   verbose_log_action_msg "Hardware Clock updated to `date --rfc-2822`"
                fi
            else
                verbose_log_action_msg "Not saving System Clock"