[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian-knoppix] time setting on KNOPPIX-2004-02-09



On Mon, Feb 09, 2004 at 10:34:09AM +0100, Conrad Newton wrote:
> I just booted the new knoppix with lang=us and WITHOUT utc.
> 
> My hardware clock is set to UTC.  I expected that without
> the utc boot parameter, the time setting would be the same
> as the hardware clock (i.e. UTC), but instead I get UTC-6:00.
>
> Is this a bug, or have I misunderstood something?

This is a bug, of my creation I'm afraid.  Earlier versions of Knoppix
were hardwired to a timezone of CET.  The latest version features a
patch of mine that overrides this to a sensible default based on the
language selection.  In the case of lang=us, this is EST.

Unfortunately, I mistakenly changed the timezone after the clock is
initialized.  (How I missed this when testing, I don't know.)  This
change from CET (UTC+1) to EST (UTC-5) resulted in your six hour loss.

A workaround is to pass the argument tz=CET (case-sensitive) to the
kernel.  I've also attached a patch for /etc/init.d/knoppix-autoconfig
that fixes the problem.

Cheers,
Tim Pope
--- knoppix-autoconfig.orig	2004-02-09 16:59:06.000000000 -0600
+++ knoppix-autoconfig	2004-02-09 17:00:52.000000000 -0600
@@ -413,6 +413,10 @@
 # Set hostname
 hostname Knoppix
 
+KTZ="$(getbootparam tz 2>/dev/null)"
+[ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ"
+cp "/usr/share/zoneinfo/$TZ" /etc/localtime
+
 # Set clock (Local time is more often used than GMT, so it is default)
 UTC=""
 checkbootparam utc >/dev/null 2>&1 && UTC="-u"
@@ -445,10 +449,6 @@
   fi
 fi
 
-KTZ="$(getbootparam tz 2>/dev/null)"
-[ -f "/usr/share/zoneinfo/$KTZ" ] && TZ="$KTZ"
-cp "/usr/share/zoneinfo/$TZ" /etc/localtime
-
 # Delete obsolete links and files before starting autoconfig
 if ! checkbootparam "nohwsetup"; then
 rm -f /dev/cdrom* /dev/cdwriter* /dev/mouse* /dev/modem* /dev/scanner* \

Reply to: