[SOLVED] time and date wrong after laptop power drained.
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This may seem like it's coming from out of left field, but . . . .
Most motherboards have a small button battery, usually a CR-2032 if I remember aright, to support the BIOS/EFI memory in case the computer is removed from power or, in the case of a laptop, the main battery goes dead and the machine is not connected to a power source. This could be an indicator that the motherboard battery, if it has one, needs replacing; otherwise, the machine should have remembered the time setting.
Like I said, a shot in the dark.
Hii frankbell, nice to see you again.
Yes, the cell battery... i know that . The laptop, as i have stripped it naked from back side :-p , there is no cell battery onboard. i believe this cheap chicky china cheap version of hp laptop is powered with capacitor only.. no cell battery.. thats my conclusion,.. hence i would expect it to reset itself when power drained for too long..
This was the case, the user just close the lid for 3 days without charging it. lol
Hii,
I am glad that after reboot, "ntp service" in "timedatectl" still active.
Q2.I am using gui as well to select time zone, the problem is the gui of systemtime display does not list out ANY list of timezone, i have to manually type it in.. hence i originally didn't know how it should be entered,.. hence always wrong time.. .
Most systems have a settings panel available from the desktop gui that can set the system date/time and timezone so the user does not have to access the command line to do so. That method uses the timezone database with (in gnome) a click on the map to select the proper time zone. I don't know where that is on all systems but from gnome it is accessed from the icons in the upper right corner.
Last edited by computersavvy; 12-14-2020 at 11:33 AM.
Regarding replacing any battery on the motherboard, sometimes this is a risky proposition. For instance to save obvious costs on a battery carrier, they would design a termination circuit which was integral to the PCB and solder the battery top and bottom, both to the board and to a fitting (stiff wire) on the top. I'm not sure soldering on the bottom is always done, they may use a conductive, heat tolerant adhesive, not sure. But I know the issue has come up from time to time and I sort of figured the lab technicians I've worked with are nearly magical talent people and it'd be no problem, only to find that I had touched a very risky subject and they informed me that it could damage the board. So they can contend with 201 size parts, but unexposed solder points such as slugs or under-soldering of things like the battery are difficult and they consider it a risk if it's not a board they have great experience with. And then there are some people who figure it's not a big deal and they've done it before.
Although what you're saying is that this capability may be replaced with a capacitor. Well I'd think that they'd design that to not result in discharge over a matter of days, however age or other factors could be causing it to discharge more rapidly. Still, unsure how you'd diagnose that without detailed design diagrams and schematic for the board.
I think if the problem of discharge is common, then either there's a method to mitigate it, by keeping it attached to a power source, or a way to reset it to the desired time each point where this happens.
Regarding replacing any battery on the motherboard,
I think if the problem of discharge is common, then either there's a method to mitigate it, by keeping it attached to a power source, or a way to reset it to the desired time each point where this happens.
I have never seen a replaceable battery to maintain bios settings on a laptop although they are common on desktops and servers. Since the laptop battery is always supposed to have power it usually would be a moot point, but the ones I have seen have an additional built in rechargeable battery for times when the main battery is removed or dead.
The OP said this happened when the user closed the lid with no charger attached for 3 days so the main battery was drained.
In any case, regardless of how the time got out of step, every bios I have seen in the last 30+ years has a way to set the date/time at that level. My experience goes all the way back to when an 80286 was a "late model" processor
Using tz in the date command does not change the system timezone. It converts the output of the date command to that tz. If you want to change the time zone of the system use the timdatectl command.
The RTC time is the Real Time Clock time and that appears to be correct.
Plus I'm not sure if a problem is that the NTP service is inactive. Are you normally connected to the internet? And any idea what's up with the NTPD on your system?
I believe if you enable that and are connected, it'll be resolved. But if you've specifically set to not be that, then I believe you need a startup script line (forget the command and syntax) which sets the clock based on the RTC.
I'm not intending to be argumentative here, but I do want to point out that it's not necessarily correct to ask people to use NTP. In some cases it could be argued against using it, and for it to be avoided.
If your settings are correct you don't need NTP anyways.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.