System.currentTimeMillis() not respecting system clock

How does System.currentTimeMillis() work? I thought it checked the system clock. But I have an application that monitors the clock and I try to catch changes in it (for instance if the user changes his/her clock during runtime). But the System.currentTimeMillis() seems to ignore the time changes of the sytem clock. Any ideas?

I had already done that. That is why I posted. I
could have sworn it worked from previous experience,
but I am not seeing it work now...The following code:import java.io.*;
import java.util.*;
public class TimeDemo {
    public static void main(String[] args) {
        try {
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            System.out.println(System.currentTimeMillis());
            br.readLine();
            System.out.println(System.currentTimeMillis());
        catch (Exception e) {
            System.out.println(e);
}Produces the following output:
$ java TimeDemo
1120149951371
1117644363468 You'll note that time appears to have gone backwards - but in fact I set the clock back during the readLine block. So I think it does respond to changing the clock (at least under Solaris on a SPARC with Java 1.5).

Similar Messages

  • Hyper-v replication Error Hyper-V received a digital certificate that is not valid from the Replica server 'burstingreplica'. Error: A required certificate is not within its validity period when verifying against the current system clock or the timestamp"

    Hi,
    When trying to initiate hyper-v replication from the main server i'm getting this error in the event logs.
    Hyper-V failed to enable replication for virtual machine 'RECADemo': A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file. (0x800B0101). (Virtual Machine ID 561591B6-567C-...)--I'm using certificate based auth and cert is installed/recognized on both machines.Please help.Thanks,Jaffer
    Jaf

    Hi,
    This error occurs because the Microsoft Certificate Trust List Publisher certificate expired. A copy of the CTL with an expired signing certificate exists in the CryptnetUrlCache
    folder. Please try to renew the Trust List Publisher certificate.
    The related KB:
    Event ID 4107 or Event ID 11 is logged in the Application log in Windows and in Windows Server
    http://support.microsoft.com/kb/2328240
    How to Renew the Site Server Signing Certificate (Microsoft Certificate Services)
    http://blogs.technet.com/b/configmgrteam/archive/2009/02/11/how-to-renew-the-site-server-signing-certificate-microsoft-certificate-services.aspx
    Manage Trusted Publishers
    http://technet.microsoft.com/en-us/library/cc733026.aspx
    Hope this helps.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • System Clock Apparently Gaining One Second Every 45 Minutes

    MacBook Pro Core Duo, OS X 10.6.8
    According to the console log, the clock on my MacBook Pro seems to be gaining about a second every 45 minutes:
    7/10/11 1:11:13 AM    ntpd[7969]    time reset -0.808832 s
    7/10/11 1:28:31 AM    ntpd[7969]    time reset -0.774710 s
    7/10/11 1:54:24 AM    ntpd[7969]    time reset -0.734610 s
    7/10/11 2:11:39 AM    ntpd[7969]    time reset -0.636148 s
    7/10/11 2:54:30 AM    ntpd[7969]    time reset -1.447670 s
    7/10/11 3:29:31 AM    ntpd[7969]    time reset -0.869028 s
    7/10/11 3:47:35 AM    ntpd[7969]    time reset -0.439925 s
    7/10/11 4:13:30 AM    ntpd[7969]    time reset -1.055200 s
    7/10/11 4:48:20 AM    ntpd[7969]    time reset -1.043842 s
    7/10/11 5:23:06 AM    ntpd[7969]    time reset -1.050135 s
    7/10/11 5:58:13 AM    ntpd[7969]    time reset -1.054077 s
    7/10/11 6:33:21 AM    ntpd[7969]    time reset -1.056519 s
    7/10/11 7:08:20 AM    ntpd[7969]    time reset -1.035000 s
    7/10/11 7:43:24 AM    ntpd[7969]    time reset -1.061526 s
    I am using the date and time auto-update in the system preferences with the Apple Time Server.  I have the identical setup on two other systems (another MacBook Pro and an intel Mac Mini) and they don't exhibit the problem.
    When I disable the auto-update and reset the clock manually using ntpdate and the NIST server, the clock only gains a second in three days with respect to the NIST server (using ntpdate to check).  When I turn the auto-update back on the same symptom recurrs.
    Any ideas as to what might be causing this and how to fix it?

    Barney-15E wrote:
    It's not your clock. There is more to network time protocol than just setting the system clock that is in the computer. Take a look here: http://www.meinberg.de/english/info/ntp.htm
    Well, that's very interesting.  Thanks.  But it doesn't explain why only one out of three identically configured computers manifests the symptom.

  • Timer misbehaves if user changes system clock

    Can I write a java 'stopwatch' application that records the time between two events, even if the user changes the system clock in between?

    I have implemented a short test program because I discovered that different JVMs (Windows <-> Linux) behaved different.
    e.g.: if you change the system clock the nanotimer is stable in Windows but not in Linux. (stable means that the nanotime reports the correct elapsed time no matter if the system clock has changed).
    Use the test program to check which version is reliable for you OS and your JVM.
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.Date;
    import java.util.TimerTask;
    public class TimingTest
        public static void checkSleepTest()
            long lastTimestamp = System.currentTimeMillis();
            long lastNano = System.nanoTime();
            System.out.println("Start waiting with Thread.sleep(). Reset the system timestamp.");
            while (true)
                try
                    Thread.sleep(5000);
                catch (InterruptedException exp)
                    System.err.println(exp);
                long time = System.currentTimeMillis();
                long nano = System.nanoTime();
                Date date = new Date(time);
                long dtime = time - lastTimestamp;
                long dnano = nano - lastNano;
                System.out.println("Timer: " + time + " " + date);
                System.out.println("dMillis: " + dtime / 1000d + " dNanos: " + dnano / 1000000000d);
                lastTimestamp = time;
                lastNano = nano;
        public static void checkWaitTest()
            Object lock = new Object();
            long lastTimestamp = System.currentTimeMillis();
            long lastNano = System.nanoTime();
            System.out.println("Start waiting with Object.wait(). Reset the system timestamp.");
            while (true)
                synchronized (lock)
                    try
                        lock.wait(5000);
                    catch (InterruptedException exp)
                        System.err.println(exp);
                long time = System.currentTimeMillis();
                long nano = System.nanoTime();
                Date date = new Date(time);
                long dtime = time - lastTimestamp;
                long dnano = nano - lastNano;
                System.out.println("Timer: " + time + " " + date);
                System.out.println("dMillis: " + dtime / 1000d + " dNanos: " + dnano / 1000000000d);
                lastTimestamp = time;
                lastNano = nano;
        public static void startUtilTimerTest()
            java.util.Timer timer = new java.util.Timer();
            TimerTask repeatTask = new TimerTask()
                private long lastTimestamp = System.currentTimeMillis();
                private long lastNano = System.nanoTime();
                @Override
                public void run()
                    long time = System.currentTimeMillis();
                    long nano = System.nanoTime();
                    Date date = new Date(time);
                    long dtime = time - lastTimestamp;
                    long dnano = nano - lastNano;
                    System.out.println("Timer: " + time + " " + date);
                    System.out.println("dMillis: " + dtime / 1000d + " dNanos: " + dnano / 1000000000d);
                    lastTimestamp = time;
                    lastNano = nano;
            timer.scheduleAtFixedRate(repeatTask, 1000, 5000);
            System.out.println("Timer has been started. Reset the system timestamp.");
        public static void startSwingTimerTest()
            ActionListener actionTask = new ActionListener()
                private long lastTimestamp = System.currentTimeMillis();
                private long lastNano = System.nanoTime();
                public void actionPerformed(ActionEvent e)
                    long time = System.currentTimeMillis();
                    long nano = System.nanoTime();
                    Date date = new Date(time);
                    long dtime = time - lastTimestamp;
                    long dnano = nano - lastNano;
                    System.out.println("Timer: " + time + " " + date);
                    System.out.println("dMillis: " + dtime / 1000d + " dNanos: " + dnano / 1000000000d);
                    lastTimestamp = time;
                    lastNano = nano;
            javax.swing.Timer timer = new javax.swing.Timer(5000, actionTask);
            timer.start();
            System.out.println("Timer has been started. Reset the system timestamp.");
            // swing timer is a deamon thread => do something else to prevent the program to exit
            while (true)
                try
                    Thread.sleep(5000);
                catch (InterruptedException exp)
        public static void main(String[] args)
            if ("swing".equals(args[0]))
                startSwingTimerTest();
            else if ("util".equals(args[0]))
                startUtilTimerTest();
            else if ("sleep".equals(args[0]))
                checkSleepTest();
            else if ("wait".equals(args[0]))
                checkWaitTest();
            else
                System.err.println(args[0] + " not supported.");
    }

  • Is Mail.app one of the "erratic" behavior apps with a reset system clock?

    I am hoping someone can help with a fine detail of mail.app (v2.1.3) behavior.
    I had an incident where an iMac sent out 200+ smtp hits a minute and was tossed of the network for presumed zombie spaming.
    I think I have actually tracked the problem to an unfortunate conjunction of circumstances that is actually innocent (if still annoying)
    Let me set up the story:
    1. This is a common use computer, so Mail is not configured (except that it is --I'll get to that in a moment) and
    2. Safari will invoke Mail when you click on an "email link"
    Mostly everyone just quits mail if they goof and click an email link.
    BUT some time ago at least one person invoked Mail and composed a message. This message, naturally, remained in the outbox ever since. That person learned that they can't send email that way, so ever since they just cmd-Q Mail.
    BUT Before this person learned, they walked through the mail-config and told mail to try hitting smtp.mac.com:"nonExistantUser".
    So that covers the lead-up. Two days ago, mail was invoked via a Safari link, BUT it wasn't quit, it was sent to the background.
    Where it undoubtedly tried to send the outbox repeatedly until it was kicked off the network.
    Here is what I don't understand:
    Under this scenario of a mis-configured .mac address, will mail repeatedly try and fail to smtp at the maximum possible rate?
    OR
    Is the one other factor I am about to describe responsible?
    The one other factor:
    The clock battery is dead and there was a power failure at 4am that day.
    The system clock reset to 1969.
    Of course, nobody reset it.
    Is mail.app one of the apps that the finder message warns "may behave erratically"?
    (a GROSS simplification) does it have a bit of code like:
    1 check time-of-last-send-mail-attempt
    check newest-item-in-outbox
    if newest-item more recent then last-send-attempt
    do send-mail and record time-of-last-send-mail-attempt
    and go to 1
    else wait X minutes and go to 1
    which, if the clock was mis-set to 1969 would always record a last-send-attempt prior to anything in the outbox and trigger a send loop.
    Does anyone know if either Mail is tenacious about sending to a bad .mac address, or gets ridiculous under this circumstance for bad-clock-set?
    Marc

    I am hoping someone can help with a fine detail of mail.app (v2.1.3) behavior.
    I had an incident where an iMac sent out 200+ smtp hits a minute and was tossed of the network for presumed zombie spaming.
    I think I have actually tracked the problem to an unfortunate conjunction of circumstances that is actually innocent (if still annoying)
    Let me set up the story:
    1. This is a common use computer, so Mail is not configured (except that it is --I'll get to that in a moment) and
    2. Safari will invoke Mail when you click on an "email link"
    Mostly everyone just quits mail if they goof and click an email link.
    BUT some time ago at least one person invoked Mail and composed a message. This message, naturally, remained in the outbox ever since. That person learned that they can't send email that way, so ever since they just cmd-Q Mail.
    BUT Before this person learned, they walked through the mail-config and told mail to try hitting smtp.mac.com:"nonExistantUser".
    So that covers the lead-up. Two days ago, mail was invoked via a Safari link, BUT it wasn't quit, it was sent to the background.
    Where it undoubtedly tried to send the outbox repeatedly until it was kicked off the network.
    Here is what I don't understand:
    Under this scenario of a mis-configured .mac address, will mail repeatedly try and fail to smtp at the maximum possible rate?
    OR
    Is the one other factor I am about to describe responsible?
    The one other factor:
    The clock battery is dead and there was a power failure at 4am that day.
    The system clock reset to 1969.
    Of course, nobody reset it.
    Is mail.app one of the apps that the finder message warns "may behave erratically"?
    (a GROSS simplification) does it have a bit of code like:
    1 check time-of-last-send-mail-attempt
    check newest-item-in-outbox
    if newest-item more recent then last-send-attempt
    do send-mail and record time-of-last-send-mail-attempt
    and go to 1
    else wait X minutes and go to 1
    which, if the clock was mis-set to 1969 would always record a last-send-attempt prior to anything in the outbox and trigger a send loop.
    Does anyone know if either Mail is tenacious about sending to a bad .mac address, or gets ridiculous under this circumstance for bad-clock-set?
    Marc

  • Hardware clock and system clock don't match

    hello. i recently upgraded to kde 4.7, and i don't know if it's the culprit or not, but my system clock is now ahead of the hardware clock by the timezone offset.
    my timezone is Asia/Manila, which is UTC+8. so if the correct time is 00:00, the system time is 08:00.
    i dual boot with windows so the HARDWARECLOCK setting in /etc/rc.conf is set to localtime.
    interestingly, the commands "hwclock --show" and "date" both show PHT as the timezone, but with the aforementioned time skew. to illustrate:
    # hwclock --show
    Fri 05 Aug 2011 10:45:02 AM PHT -0.500309 seconds
    # date
    Fri Aug 5 18:45:02 PHT 2011
    running "hwclock --hctosys" fixes the problem while logged in, but restarting the computer reverts the problem. i could put a daemon that runs the command at startup, but i never needed to do that before and i'm not inclined to at the moment. i think this is just a misconfiguration somewhere.
    thanks for any help you could give.

    hello. it is
    hwclock from util-linux 2.19.1
    Using /dev interface to clock.
    Last drift adjustment done at 1312511647 seconds after 1969
    Last calibration done at 1304274137 seconds after 1969
    Hardware clock is on local time
    Assuming hardware clock is kept in local time.
    Waiting for clock tick...
    ...got clock tick
    Time read from Hardware Clock: 2011/08/05 12:08:46
    Hw clock time : 2011/08/05 12:08:46 = 1312517326 seconds since 1969
    Fri 05 Aug 2011 12:08:46 PM PHT -0.690104 seconds

  • Finder has got out of sync with system clock?

    For some reason, the system clock is reading the correct time, but the times indicated in Finder for "Date Modified" for every file or app are all wrong.
    For example, at 11:45PM (as indicated by the clock in the menu bar) I installed OnyX for the first time, but when I look at the newly-installed app itself in the Applications folder in Finder, in the Date Modified column it says "Today 11:23PM". Also, various different apps and files have identical Date Modified times - several have 12:12PM, several have 8:08AM, and many have 4:16PM.
    Two more confirmers that there's a problem - I just created a new folder at 12:35AM, and immediately went to look at it in the Finder - its Date Modified is "Today 12:00AM". And when I start up Plex, its own on-screen clock says "12:00AM" when the clock in the menu bar says 12:40AM.
    I've zapped the PRAM and forced a Spotlight reindex, but they've made no difference. Any suggestions?

    Is the correct Time Zone set for your region of use?
    Is the Time set to be coordinated with a network time server?
    These are two basic things that could go wrong. There may
    be others. I'm not sure at this moment what they may be.
    You may have to see if your use of OnyX has somehow
    changed the basic system settings; or maybe you did
    not use the section most likely in OnyX to be helpful.
    Or something else is acting up.
    (Looking into my Date Time panel now has me wondering,
    since I never look into there. It just works, usually!)
    Good luck & happy computing!

  • Java Thread.. System Clock gets slower..

    Hello All!
    I have never came accross such problem in my last 4 years of java development but right now its sucking my brain like any thing..
    Let me clerify what my application is doing.
    A node which is basically thread is executed and as it performs its job it is stopped by breaking the while loop like logic and then a method isRunnable() is called to calculate the time to run the thread again on the basis of pre-defined schedule (e.g. after 1 minute). so what i was doing in this method i was calling wait (sheduledMinutes*60*1000).
    There are multiple nodes which can be run in parallel. Problem occured when some nodes started immediately or after a time much shorter than the value defined in wait() method.
    So as an alternative way i decided to not rely on wait() and wrote my own implementaion i.e. i call wait(1000) in isRunnable() and the check if the current system time is less then the scheduled time. But it didn't work either.
    The problem revealed when i printed the valued of current time taken by the system and the scheduled one. The System clock gives the current time which is less than the actual System time shown on windows clock. I dont know why but it seems like as my threads continue to run the system clock gets slower or something and returns an old time. Hence nodes start immediately.
    Any solution to this problem would be highly appreciable.
    Regards,

    Well yeah u r right. I figured it out that it was just my threads running slowly. But the threads ran immediately there was another reason for that. My threads were waiting for the sheduled minutes to run again. In the mean while if i presed the stop button to stop the thread i was just setting the stop variable value to true. Which was basically the check in the while loop in run method. U can notice the thread still sleeping due to the call to wait method. And then if again mean while i press start button i called System.gc(). and then pass the current thread to new Thread like Threa t = new Thread(node); t.start();
    Now u can c another thread has been created but the last one was not collected by the garbage collector as it was still waiting and doing something ofcourse not dead. So now when new thread stops these was a possiblity of last thread ( one in waiting state) to run according to schedule and it make the current thread run immediately.
    I hope u can understand how difficult it was for me to figure this thing out :)
    But after 3/4 hours hair tearing i got the bug and then when i was stopping a thread i infact broke the waiting loop as well. Now the thread was dead and collected by garbage collector before new thread could start :)
    Hhhhhhhhhhhhhh sometimes programmign really sucks.
    Have fun. and thanx for ur concern..
    Regards

  • I would like to display two system clocks for different time zones

    I would like to display a couple of time zones on my system clock. Can this be done? Like having my current location date and time and another showing the date and time for Madrid, Spain.
    If this can't be done, how do I add clocks (or calendars) to my desktop?

    In the widgets screen, click the + sign in the lower left.  This should show you the widgets you have.  World clock is the one your looking for and may not be on the first screen.  There's an arrow on the far right side to slide to the next screen.  When you find World Clock just click on it and it will add a clock.  Click again and it adds another one on top of the first.  Grab the clock anywhere on it's display and drag it to the desired location. 

  • [SOLVED]System clock off

    My system clock is set a day late.  I tried using the "date" command, but I get the following error:
    $ sudo date 06151150
    sudo: timestamp too far in the future: Jun 16 11:37:36 2008
    Here are the pertinent lines from my rc.conf:
    LOCALE="en_US.utf8"
    HARDWARECLOCK="UTC"
    TIMEZONE="US/Eastern"
    KEYMAP="us"
    CONSOLEFONT=
    CONSOLEMAP=
    USECOLOR="yes"
    Any help would be great!
    Last edited by crisnoh (2008-06-15 16:31:35)

    Hey, this seems to be a security feature of sudo, so if you can, run it as root instead.
    There is a few solutions to the problem, one of which seems to be the one listed at here, where the solution just seems to be removing a simple file, but I have not tried it myself so dont know for sure.

  • Display Synchronised System Clock With Milliseconds (HH:MM:SS:mm)

    Hello All,
    I need to display the system clock with hours, minutes, seconds and milliseconds (the system clock it synchronised via NTP or GPS and needs to be accurate)
    Using the Buddy API time functions I can display the time with an accuracy of seconds but the inbuilt lingo "the Milliseconds" and Ticks does not correspond to the system time.
    for example I tried using
    member("MyTimeStamp").text = baSystemTime("%0H"&":"&"%0M"&":"&"%0S"&":"&chars(""&the milliseconds, 6,7))
    but the seconds change out of synch with the milliseconds, the milliseconds are approximately 10-12 ms faster and I don't want to fudge the timing, I recorded the display with a slow motions camera and can see the seconds reset to 0 when the milliseconds are already at a value of 10 - 12.
    Any Idea how I can derive milliseconds using the system time? HH:MM:SS:mm
    thanks.

    10-12 ms delay (error) is the correspondent of a 80-100 FPS (polling interval).
    Theoretically speaking, to get 1ms delay (error) you need to run your script at 999 FPS (the max value allowed by D12).
    Practically speaking, that's not possible (many other factors are involved here).
    cheers

  • System clock loses 15 seconds in one hr ??

    My system clock loses 15 seconds in one hr ??  I changed the mainboard battery , and still have the same issue ?
    Ideas and thanks

    Butch wrote:
    >
    > In doing data acquisition using a DAQPad-MIO-16XE-50 (a parallel port
    > device) I noticed that the system clock is losing time. I have a
    > second independent clock that is displayed and recorded on video,
    > which is how the discrepancy came to light. I am using LV6.0.2. This
    > behavior happens on both Windows 98 and NT4.0. A delta of 5 minutes
    > 14 seconds occurred in 3.5 hours. The resulting loss of sync between
    > the data written to disk and the video is a problem. The experiment
    > runs are from 7 to 15 hours long. There is also communication through
    > the serial port that involves several wait statements to allow for the
    > latency of some of the devices.
    > What is causing the apparent slowdown of the system clock? Is there a
    > fi
    x?
    A work-around: run a time sync program like Dimension 4,
    www.thinkman.com . Make that program set your PC clock from the Internet
    as often as needed.
    Tip, it usually uses a machine name like wwvb.isi.edu.
    You probably get less overhead if you use an IP address like
    128.9.176.30, because then it doesn't have to do DNS.
    BTW, Win2000 is much better in this respect.
    Mark

  • [SOLVED] System Clock Issues (Wrong UTC?)

    **RESOLVED -- SEE END FOR FIX
    Hello everyone.
    First off I'd like to say that I am thrilled to be here. I've been an Ubuntu user for a few months now, but decided that it was time to take a trip down the rabbit hole and see all that Linux had to offer--and to that end I switched to Arch. And I must say that I have nothing but positive things to say of it. The documentation on the Arch Wiki was phenomenal in helping me get started on the process, and the installation of it has proved to be a very enjoyable learning experience.
    With that said, I have run into a bit of a snag, and after perusing the documentation on the Wiki, as well as running a few Google searches and searches of this particular forum, am no closer to a solution that when I started, so here I am. The problem is with my clock.
    Okay, so I live in the Eastern United States, and as a result have my local time set as Eastern, and I have my hardware clock running UTC. Here is the problem. . . For whatever reason, the time displayed on my clock is five hours behind. Perplexed, I decided to see if I had set up my time zone info incorrectly and ran the "timedatectl status" command, and the results were really strange. A copy paste of the output is here:
          Local time: Thu, 2012-12-20 19:27:02 EST
      Universal time: Fri, 2012-12-21 00:27:02 UTC
            RTC time: Fri, 2012-12-21 00:27:02
            Timezone: America/New_York
          UTC offset: -0500
         NTP enabled: no
    NTP synchronized: no
    RTC in local TZ: no
          DST active: no
    Last DST change: EDT → EST, DST became inactive
                      Sun, 2012-11-04 01:59:59 EDT
                      Sun, 2012-11-04 01:00:00 EST
    Next DST change: EST → EDT, DST will become active
                      the clock will jump one hour forward
                      Sun, 2013-03-10 01:59:59 EST
                      Sun, 2013-03-10 03:00:00 EDT
    As you can see, the time zone is set correctly to America/New_York (originally US/Eastern, but I changed it to try and resolve the problem--to no effect, obviously). However here is where it gets strange. As I type this, it is 00:27 local time. My computer has decided to use the local time for UTC, and then subtracts five hours (as I live in UTC -5) to get the local time that it displays.
    I've tried rerunning the hwclock --systohc --utc command, to no avail.
    If anyone has any input as to why my computer is confusing UTC and local time, and any way I could fix it, I would greatly appreciate it.
    I could just change my timezone to UTC - 0, that would cause my system to display the right time (I think) but I'd rather actually fix the problem, instead of simply covering it up with a band aid, if it is possible.
    Thank you,
    Douglas
    EDIT:
    I probably should mention that the machines (I'm having this same problem on two different computers) are both running Arch Linux and Arch Linux alone, although one was originally a Windows 7 and the other a dual boot of Win 7 and Ubuntu.
    RESOLUTION (Thanks lhoffman):
    Install the network time protocol daemon. This will allow you to sync your system time over the internet.
    sudo pacman -S ntp
    Once installed, run the following command:
    ntpdate pool.ntp.org
    This will link your computer with the time servers of the NTP Pool Project. For me my clocks fixed themselves quickly after running the command. And that was it.
    After running this command and setting the system clock, run:
    hwclock -systohc      (thanks Scimmia)
    Otherwise the computer will mistake local time for UTC and subtract/add time based upon your timezone again upon reboot.
    Last edited by douglasr (2012-12-21 21:23:11)

    Scimmia wrote:Not exactly. The root of the problem is that your hardware clock is set to localtime. To change this, you need to update the system (software) clock, which ntpd already did for you. The timedatectl command would have just done that manually. Now that your system clock is correct, you need to write this to your hardware clock so that it is correct when you reboot. hwclock --systohc does that. If you don't run that command, the system will boot up thinking it's getting UTC from the hardware clock and will subtract 5 hours. Then, once ntpd runs, the time will skip ahead 5 hours. This will cause all kinds of issues.
    I fixed this on my system too. Thanks for the explanation.

  • System clock fails to update after waking from sleep

    I've noticed that my new PowerMac G5 Dual-Core 2GHz (running Mac OS X 10.4.3) doesn't update its system clock to the current time after waking from sleep.
    When I put it to sleep and then wake it some time later, the Clock in the upper right-hand corner doesn't update to the current time. It still ticks on (second for second) but remains out of sync.
    Opening the Date & Time preferences pane will restore the time to the correct setting.
    This problem only occurs with sleep and then wake-from-sleep. It doesn't happen when I shut down the machine and then restart it.
    Does anybody know if I've got a malfunctioning machine? It's only 1 day old...
    Or better still, how do I solve this problem?
    PowerMac G5 Dual-Core 2GHz   Mac OS X (10.4.3)  

    No, my Mac is not having trouble contacting the time server. I checked the console log and found no messages related to this.
    I am on a broadband always-on connection (recently switched from DSL to cable modem, and the problem occurred under both connections). However, my original post states that the computer loses time only when it is asleep, and I didn't think that my computer could contact the time server when it is asleep. It also loses time when it is off, which I neglected to mention previously. Am I mistaken in thinking that the computer communicates over the network only when it is awake? Since it keeps accurate time when awake (once I've reset it by opening the Date & Time control panel), it seems to me like it IS communicating with the time server without issue.
    [And I apologize for misinterpreting your question as a suggestion. I was trying to be polite by thanking you for taking an interest in my issue. I'll watch my semantics more carefully next time.]
    Cheers,
    Katy
    G5/dual core 2.3 Ghz   Mac OS X (10.4.4)   2.5G RAM

  • My system clock

    after I flashed my bios the system clock in the bios reset to 0:00:00 so I set them to the right time and rebooted my computer. After I did that I started to notice that the clock in win98 SE was losing minutes compared to the clock on my cable box. I didn't think anything of it and turned off my computer and went to bed. I woke up today and booted up my computer and win98 still said the time yesterday when I had shut it off and still had yesterdays date. My question is what is wrong or what am I doing wrong, and could this be stopping me from installing winXP or 2000 on my system?
    Specs:
    AthlonXP 2000+
    Kingston 256MB DDR PC2100
    Samsung 60GB HDD
    48X CDRW
    16X DVD
    ATI Radeon 9000 Pro
       Thanks for any help.

    Quote
    I pulled out my CMOS battery and checked the connection it seems fine, I can't check the volts for I don't have a meter. It is still doing it, is there a possability the battery could be bad and I should replace it? Also would this stop me from installing WinXP or 2000?
    with a dc volt meter it is hard to get an accurate reading of the bat......what is the pc health giving for vbat....for an extended period?
    This should not stop installs of the os I do not think.
    I would double check you pin assignments for you other stuff.......like power led and reset....
    Hav you tried installing your os with just the minimum components......where does it get to in installation?

Maybe you are looking for