Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Change from UTC time back to local time?

  1. #1
    Join Date
    Jun 2008
    Location
    Connecticut, USA
    Posts
    2,294
    Blog Entries
    1

    Arrow Change from UTC time back to local time?

    Somehow, and I don't know how, the clock on my openSUSE 12.1 KDE system has changed to UTC time.

    I don't know how it happened or why.

    I found online this suggestion which I tried, but it didn't do anything
    Linux Tips - Linux, Clocks, and Time
    Setting UTC or local time

    When Linux boots, one of the initialisation scripts will run the /sbin/hwclock program to copy the current hardware clock time to the system clock. hwclock will assume the hardware clock is set to local time unless it is run with the --utc switch. Rather than editing the startup script, under Red Hat Linux you should edit the /etc/sysconfig/clock file and change the ``UTC'' line to either ``UTC=true'' or ``UTC=false'' as appropriate.
    I have also looked into "Adjust Date and Time" and "Digital Clock Settings" but nothing struck me as what it was I needed to change.

    I'll admit, I was hoping for a "Show UTC" or something like that with a checkbox but I haven't seen one yet.
    "Linux provides freedom, problem is most users don't know what it is or how to use it." ~me
    Friends don't let Friends wear red shirts on away parties!
    Linux User #477531 | Danbury Area Computer Society (www.dacs.org)

  2. #2
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Change from UTC time back to local time?

    On 2012-03-11 01:46, dragonbite wrote:
    >
    > Somehow, and I don't know how, the clock on my openSUSE 12.1 KDE system
    > has changed to UTC time.


    Do you mean that the KDE clock applet is displaying time as UTC? Well, just
    tell the applet to display it in the timezone you prefer, but do not
    attempt to change the clock.


    Or do you mean that the system clock is incorrect? How do you know?
    No, KDE is not acceptable as proof :-)
    I only accept command line commands and output.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  3. #3
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,748

    Default Re: Change from UTC time back to local time?

    Adjusting the hardware clock is done In Yast. KDE clock is only to adjust time for the user. If you dual boot with Windows it is probably best to set the hardware clock to local time since Windows expects that by default.

  4. #4

    Default Re: Change from UTC time back to local time?

    I have exactly the same problem as drgonbite. I do not run windows, I only have OpenSUSE running and the clock is set to UTC time. I have used the settings to try and change it but nothing works.
    Any help appreciated.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,170

    Default Re: Change from UTC time back to local time?

    I think there is some misunderstandfing here about the several expressions used.

    . In Unix/Linux the system clock runa allways aat UTC (when not you are asking for problems).

    . At shutdown, the sytem clock stores the time in the hardware clock of the PC, it normaly does so also in UTC, but when you multi boot with Windows, you better store the local time in the hradware clock because Windows has a cpmplete different look at those things. This setting is in in YaST. At boot, the system clock is first set from the hardware clock and again it knows from the setting if it has too ajust
    from a local time hardware clock to an UTC system clock or it it can use the hardware clock withoutr adjusting.

    . Because these hardware clocks are not allways that precise in keeping time in a power downed system (they use the CMOS battery), a system manager normaly makes the system an NTP client to correct the system clock direct after boot and then during the tim the system is up.

    . Every process can have a environment variable that tells it in which time zone this process should interprete time. There is such a timezone for the system itself. Thus most proceesses (and root procecces) started without further specification use this setting. It s normaly set to the time zone the system is physicaly. It is set at iinstallation and changeble using YaST.

    . Every user can set his own time zone (after all, users can log in in a system from everywhere in the world and of course want to see time in there own time zone, not the time zone of the system or of another user). For a KDE user there is the KDE configuration tool to do this.

    Thus, when you want to reposrt a problem with a clock setting, we need to know which one is wrong in your opinion and also which one is correct. Like said above allready, we need CLI output to come to any conclusion. Thus e.g. as root you do
    Code:
    date]
    and tell us what you wall clock or watch shows.
    And the same for a user (if there is a user that complains).

    And to check what the configuration is:
    Code:
    cat /etc/sysconfig/clock
    Henk van Velden

  6. #6
    Join Date
    Jun 2008
    Location
    /dev/swat
    Posts
    1,181

    Default Re: Change from UTC time back to local time?

    I was having the same problem after upgrading to 4.8.1 from .8.0 . Yes, i do dual boot(but don't use windozzz$$$). The solution was quite simple. As gogalthorp already suggested you need to change it from YaST. Open YaST and go to Date & Time and uncheck 'Hardware clock set to UTC'. That would done it. At least it worked for me.
    Linux[openSUSE, KDE], PHP, MySQL, Wordpress, Tech News, etc :
    http://anl4u.com

  7. #7

    Default Re: Change from UTC time back to local time?

    Thank you for the replies! My Hardware clock set to UTC was already unchecked. Yet in my task bar it clearly states that it is using UTC! It is really puzzling.
    I have put the output of the CLI commands below:-
    linux-0u5w:~ # date]
    If 'date]' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf date]

    linux-0u5w:~ # cat /etc/sysconfig/clock
    ## Path: System/Environment/Clock
    ## Description: Information about your timezone and time
    ## Type: string(-u,--utc,--localtime)
    ## ServiceRestart: boot.clock
    ## Command: /sbin/refresh_initrd
    #
    # Set to "-u" if your system clock is set to UTC, and to "--localtime"
    # if your clock runs that way.
    #
    HWCLOCK="--localtime"
    ## Description: Write back system time to the hardware clock
    ## Type: list(yes,no,)
    #
    # Is set to "yes" write back the system time to the hardware
    # clock at reboot or shutdown. Usefull if hardware clock is
    # much more inaccurate than system clock. Set to "no" if
    # system time does it wrong due e.g. missed timer interrupts.
    # If set to "no" the hardware clock adjust feature is also
    # skipped because it is rather useless without writing back
    # the system time to the hardware clock.
    #
    # Note that you need to enable boot.clock for this feature to take
    # effect.
    #
    # defaults to 'yes' if unset
    #
    SYSTOHC=""

    ## Type: string(Europe/Berlin,Europe/London,Europe/Paris)
    ## ServiceRestart: boot.clock
    ## Command: /sbin/refresh_initrd
    #
    # Timezone (e.g. CET or Asia/Tokyo). The value should correspond
    # to the contents of the /etc/localtime file and is for internal
    # YaST use; changing this setting will not make SuSEconfig update
    # the /etc/localtime file, YaST does that or you will need to do
    # this manually by calling zic -l.
    #
    TIMEZONE="Australia/Melbourne"
    DEFAULT_TIMEZONE="US/Eastern"

    I appreciate the help that is being provided.

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,170

    Default Re: Change from UTC time back to local time?

    Hm, that should of course be
    Code:
    date
    my typo.

    But you should of course post any computer text between CODE tags: http://forums.opensuse.org/english/i...ags-guide.html

    You seem to have configured Australia/Melbourne as your system time zone. Thus the output of date sshould correspond with that.
    Henk van Velden

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Change from UTC time back to local time?

    On 2012-03-11 13:56, ningbojoe wrote:
    >
    > Thank you for the replies! My Hardware clock set to UTC was already
    > unchecked. Yet in my task bar it clearly states that it is using UTC! It
    > is really puzzling.


    Read again what Henk posted.
    Whether you set in YaST the hardware clock to UTC or not, this is
    absolutely and completely unrelated to the taskbar displaying UTC or any
    other timezone.

    Please don't confuse things, and clarify where exactly you want to use UTC
    or not. If it is KDE, it is uniquely a KDE issue, do not touch YaST, or you
    will break things further.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Change from UTC time back to local time?

    On 2012-03-11 12:56, hcvv wrote:
    >
    > I think there is some misunderstandfing here about the several
    > expressions used.


    Indeed! :-)

    > In Unix/Linux the system clock runa allways aat UTC (when not you are
    > asking for problems).


    To clarify a bit: Linux internally always runs UTC and this can not be
    changed at all.

    To be a bit pedantic, time is actually kept as seconds counted
    since the UTC midnight of 1970-01-01
    (<http://en.wikipedia.org/wiki/Unix_epoch>)

    The local/utc setting only applies to the battery kept cmos clock that runs
    when the system is not powered, and copied to the system clock when it boots.

    And, as you say, every process or user can choose what time it uses. Or
    rather, what time it displays, internal clock remains UTC.

    Thus whether KDE displays UTC or one flavour of local time is totally
    unrelated to the cmos clock setting "utc/local". And also independent of
    what other desktops or programs show.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •