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

Re: How to disable UTC time?



Yuwen Dai wrote:
On 7/9/13, Ralf Mardorf <ralf.mardorf@alice-dsl.net> wrote:
On Mon, 2013-07-08 at 22:12 -0600, Joe Pfeiffer wrote:
Yuwen Dai <yuwend@gmail.com> writes:

Dear all,

My BIOS clock is set the time as my local time, debian thinks it's UTC
time,
so it adds 8 hours because I'm in timezone UTC+8, this is not correct.
I do
these actions to disable UTC:

1.  add UTC=no in /etc/init.d/rcS

!!!!

/etc/default/rcS
_not_
/etc/init.d/rcS


Sorry, my typo.  I also modify /etc/default/rcS in fact.

*?*

2. remove UTC , add LOCAL in /etc/adjtime

Neither of the above works.  Yesterday  I set the BIOS clock as UTC
time, then
Linux added 8 hours to it, it's my local time which was correct.  But
this
morning, the system time in Linux is 8 hours ahead again.

So how to disable UTC or set the correct clock?  I'm using Debian
Wheezy.

Best regards,
Yuwen

I realize this is the sort of answer that annoys me to death when I get
it...  but why not fix the time on your BIOS clock?

Then the OP would get the wrong time by the computer e.g. for software
that does run without an OS, for saved BIOS settings.

I use local time too and for Arch Linux ntpdate doesn't set the hardware
clock anymore, so after running ntpdate I run hwclock on Arch, perhaps
this now is needed for Debian too.

My unused Debian install:

[rocketmouse@archlinux avlinux]$ cat etc/init.d/rcS
#! /bin/sh
#
# rcS
#
# Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
#

[rocketmouse@archlinux avlinux]$ ls etc/rcS.d/
README               S08hwclockfirst.sh    S35mountall.sh
S45mountnfs.sh
S00live-config       S10checkroot.sh       S36mountall-bootclean.sh
S46mountnfs-bootclean.sh
S02hostname.sh       S11hwclock.sh         S36udev-mtab
S47lm-sensors
S02mountkernfs.sh    S12mtab.sh            S37mountoverflowtmp
S48console-screen.sh
S03udev              S18ifupdown-clean     S38pppd-dns
S49console-setup
S04mountdevsubfs.sh  S20module-init-tools  S39ifupdown
S50alsa-utils
S05bootlogd          S30checkfs.sh         S40networking
S55bootmisc.sh
S05keymap.sh         S30procps             S40pcmciautils
S55urandom
S06keyboard-setup    S31hibernate          S43portmap
S70x11-common
S07hdparm            S34fuse               S44nfs-common
S99stop-bootlogd-single

[rocketmouse@archlinux avlinux]$ cat etc/adjtime
0.002664 1363282063 0.000000
1363282063
LOCAL

[rocketmouse@archlinux avlinux]$ cat etc/default/rcS
#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=no
VERBOSE=no
FSCKFIX=no
RAMRUN=no
RAMLOCK=no


The manual of rcS says UTC in rcS is not supported and suggests use
UTCor LOCAL in /etc/adjtime.  I tried both UTC=no in rcS and LOCAL in
/etc/adjtime,  no effect.  And /etc/adjtime seems a dynamically
created file.

Best regards,
Yuwen dai


Hi,

Depending on the version of windows you're using you can configure windows to use UTC time. Here's the archwiki link:
https://wiki.archlinux.org/index.php/Time

Best wishes,
Kailash


Reply to: