What is Hwclock?

Welcome Delta Sigma Pi

  • Accessibility
  • Sales:

    Home:

    1-800-426-7235

    Business:

    1-866-426-0911

    Chat Now >

    Visit Sales Support Page >


    Order Support:

    Order Lookup >

    Visit Order Support Page >

    Technical Support >

Lenovo
All
  • All
  • Laptops
  • Desktops
  • Workstations
  • Monitors
  • PC Accessories & Electronics
  • Tablets
  • Servers & Storage
  • Servers Accessories
  • Sign In / Create Account
    My Lenovo Account
    Keep track of your wishlist, orders, and rewards all in one place
    Sign In / Create Account
    Welcome Back!
    Access your order, subscriptions, saved carts, rewards balance, and profile
    View My Account
    Orders
    View & track your orders
    Rewards
    Earn & redeem Rewards
    Profile
    Edit name, password, and account settings
    Wishlist
    Manage a wishlist of your favorite products
    Products
    Manage your devices, accessories
    Product Registration
    Register your product and/or update your warranty dates
    Sign Out
  • My Lenovo Rewards
  • Cart
  • Products
  • Solutions
  • Services
  • Support
  • About Lenovo
  • Deals
  • Student
  • Gaming
  • Laptops
  • Desktops
  • Workstations
  • Accessories
  • Software
  • Monitors
  • Tablets
  • Servers & Storage
  • Home & Office
  • AI
  • Deals
TEMPORARILY UNAVAILABLE
DISCONTINUED
Temporary Unavailable
Cooming Soon!
. Additional units will be charged at the non-eCoupon price. Purchase additional now
We're sorry, the maximum quantity you are able to buy at this amazing eCoupon price is
Sign in or Create an Account to Save Your Cart!
Sign in or Create an Account to Join Rewards
View Cart
Remove
Your cart is empty! Don’t miss out on the latest products and savings — find your next favorite laptop, PC, or accessory today.
item(s) in cart
Some items in your cart are no longer available. Please visit cart for more details.
has been deleted
Please review your cart as items have changed.
of
Contains Add-ons
Subtotal
Proceed to Checkout
Yes
No
Popular Searches
What are you looking for today ?
Trending
Recent Searches
Items
All
Cancel
Top Suggestions
View All >
Starting at
  • Black Friday in July! Limited-time Doorbusters + Buy more, Save more!  Shop Now >

  • My Lenovo Rewards! Earn 3%-9% in rewards and get free expedited delivery on select products. Join for Free >

  • Buy online, pick up select products at Best Buy. Shop Pick Up >

  • Lease-to-own today with Katapult. Get started with an initial lease payment as low as $1! * Learn More >

Home > Glossary > What is Hwclock?
Glossary Hero
Learn More
StarStar

Annual Sale

Lenovo Laptop SaleLenovo Laptop Sale

Laptop Deals

Desktop DealsDesktop Deals

Desktop Deals

Workstation DealsWorkstation Deals

Workstation Deals

StoreStore

Pick Up Today at Best Buy

ControllerController

Gaming PC & Accessory Deals

MouseMouse

PC Accessories & Electronics Deals

MonitorMonitor

Monitor Deals

Tablet and phoneTablet and phone

Tablets & Phones Deals

ServerServer

Server & Storage Deals

Discount tagDiscount tag

Clearance Sale


What is Hwclock?

Hwclock, or hardware clock, is a command-line utility in Linux® that interface with your system's real-time clock (RTC) to keep the precise time, even when the system is powered off. This clock is distinct from the software clock that runs when your system is operational. Using hwclock, you can set, synchronize, and display the hardware clock time, ensuring it matches your operating system's clock. It's crucial for keeping correct timestamps on files, logging events, and scheduling tasks. The utility helps bridge the gap between hardware and software, offering seamless time management.

What's the difference between the hardware clock and the system clock?

The hardware clock, accessed by Hwclock, runs continuously, even when the computer is turned off, providing time information before the operating system is loaded. The system clock, on the other hand, is a software clock supported by the operating system and starts running as soon as the system boots. Hwclock is used to synchronize these two clocks.

How can I view the current hardware clock time using Hwclock?

To view the current hardware clock time, you can run the command `hwclock --show` in the terminal. This command displays the current time stored in the hardware clock, helping you verify its accuracy or diagnose any issues related to time management on your system.

How do I check the current hardware clock time with Hwclock?

To check the current hardware clock time. You can simply use the command hwclock --show or hwclock -r in your terminal. This command reads the time directly from the hardware clock and displays it in a user-friendly format. It's a quick way to ensure that the hardware clock is set correctly and in sync with your system's time. If discrepancies arise, you might need to adjust the clock settings to avoid issues with time-sensitive applications.

Can I use Hwclock to set the hardware clock to a specific time?

Yes, you can use Hwclock to set the hardware clock to a specific time. By using the command `hwclock --set --date="YYYY-MM-DD HH:MM:SS"`, you can specify the exact date and time you want the hardware clock to be set to, allowing precise timekeeping.

Does Hwclock need special permissions to execute?

Yes, due to its direct interaction with the system's hardware clock, Hwclock typically requires root permissions to execute. This is to ensure that unintended or unauthenticated changes to the system time are prevented, keeping system security and stability.

What format does Hwclock use to display time?

Hwclock displays time in the local time zone by default, using the format `YYYY-MM-DD HH: MM: SS, which stands for the year, month, day, hour, minute, and second. This format makes it easy to read and interpret the time displayed by Hwclock.

How does Hwclock handle time zones?

Hwclock does not directly handle time zones. Instead, it assumes the hardware clock is set to either local time or coordinated universal time (UTC) and relies on the operating system to handle time zone adjustments. When setting or reading the hardware clock, you need to be aware of the time zone context to avoid inaccuracies.

Can Hwclock synchronize time with an external time server?

No, Hwclock does not directly synchronize time with external time servers. Its primary function is to set or read the time from the hardware clock. Time synchronization with external servers is typically handled by different tools, such as network time protocol (NTP) clients, which then update the system clock, with Hwclock used to synchronize the hardware clock based on the system clock.

Does changing the hardware clock time affect the system clock?

When you use Hwclock to update the hardware clock, the change does not automatically reflect on the system clock until a synchronization occurs. However, most modern systems synchronize these clocks at boot time and shutdown, ensuring consistency between system and hardware time settings.

How do I ensure Hwclock uses local time instead of UTC?

To ensure Hwclock uses local time, you can use the command `hwclock --localtime` when setting or reading the hardware clock. This tells Hwclock to treat the hardware clock time as local time, which is particularly important in systems dual booting with other operating systems that require the hardware clock to be set to local time.

Is Hwclock compatible with all Unix-like operating systems?

Yes, Hwclock is compatible with most Unix-like operating systems, including Linux® distributions and FreeBSD. However, its availability and specific functionality may vary slightly between different systems, so it is advisable to consult the system's documentation or the hwclock man page for system-specific details.

Can Hwclock be used to diagnose hardware clock issues?

Yes, Hwclock can be an effective tool for diagnosing issues with the hardware clock. By comparing the time reported by Hwclock with the system clock and actual time, users can find discrepancies that may show a malfunctioning real-time clock (RTC) battery or hardware failure. Additionally, the `--debug` choice provides detailed output that can help troubleshoot.

Does Hwclock support different time zones?

Hwclock itself doesn't handle time zones directly, as it focuses on supporting UTC or local time settings on your hardware clock. However, your Linux® system uses the /etc/adtime file and other system configurations to manage time zones. By setting your hardware clock to UTC and configuring your system time zone correctly, you can ensure that hwclock works seamlessly with your desired time zone. This approach minimizes confusion and keeps uniformity across different regions.

Does Hwclock support 24-hour time format?

Hwclock inherently uses the 24-hour time format, as it primarily deals with system-level timekeeping. When you use commands like hwclock --show, the output typically displays time in a 24-hour format. This format is standard in computing environments, promoting clarity and reducing confusion in time-sensitive operations. By using this approach, hwclock aligns well with other system utilities and applications that rely on precise time representation.

Does Hwclock work with virtual machines?

Hwclock can work with virtual machines, but its behavior may vary depending on the virtualization platform and configuration. In many cases, virtual machines rely on the host system's clock for time synchronization, so hwclock might not directly manage the hardware clock. However, you can still use hwclock within a virtual machine to check and adjust the system time if necessary. It's essential to ensure your virtual environment is configured correctly for exact timekeeping.

Looking for a Great Deal?
Shop Lenovo.com for great deals on A+ Education PCs, Accessories, Bundles and more.
Shop Deals Now

  • Legion 7i Gen 9 (16″ Intel) Gaming Laptop
    Starting at
    $1,699.99
    Learn More
  • ThinkPad X9 15 Aura Edition (15ʺ Intel) Laptop
    Starting at
    $1,127.97
    Learn More
  • Yoga Book 9i (13” Intel)
    Starting at
    $1,999.99
    Learn More
  • Yoga 9i 2-in-1 Aura Edition (14″ Intel) Laptop
    Starting at
    $1,439.99
    Learn More
  • ThinkPad P1 Gen 7 (16″ Intel) Mobile Workstation
    Starting at
    $1,871.22
    Learn More
  • Shop
    • Student Deals
    • K-12 Student Laptops
    • Student Accessories
    • Laptops by Major
    Education resource
    Explore
    • What is STEM?
    • Best Laptops for College
    • Student & Teacher Discounts
    • Lenovo Sustainability Programs
    Education carry case

    Stem Articles
    See All STEM Articles
    • Online STEM Education

    • STEM Career Tips & Resources

    • Women in STEM

    • STEM Educator Training

    • STEM Grants & Funding

    • STEM Education: Coding for Kids

    • STEM Education: Robotics

    • STEM Education: Biotechnology

    • STEM Education: Sustainability

    • STEM Education: AI & ML

    While every effort has been made to ensure accuracy, this glossary is provided for reference purposes only and may contain errors or inaccuracies. It serves as a general resource for understanding commonly used terms and concepts. For precise information or assistance regarding our products, we recommend visiting our dedicated support site, where our team is readily available to address any questions or concerns you may have.

    Why Lenovo?

    Go Greener with Leno...

    Lenovo is committed to Smarter Climate Action with lower energy laptops, use of sustainable materials and packaging, and available CO2 Offset Services.
    Learn More
    pastel background

    Get It Now, Pay For ...

    Lenovo has multiple financing option: the Lenovo Credit Card, installment plans, and lease-to-own financing op...
    Learn More
    pastel background

    Productivity & Peace of Mind

    Stay productive with Premium Care Plus - 24/7 priority support and coverage against accidental damage. Power through your day with our Smart Performance and extended battery solutions.
    Learn More
    pastel background

    Fast & Secure

    Get the most from your laptop with Lenovo’s state-of-the-art Smart Performance, delivering powerful, all-in-on...
    Learn More
    pastel background

    Assistance and Suppo...

    Chat with a trained professional who can help you find the right products, place or check on an order, or setup your Education laptop.
    Contact Us
    pastel background
    Enter email to receive Lenovo marketing and promotional emails. Review our Privacy Statement for more details.
    Please enter the correct email address!
    Email address is required
    • Facebook
    • Twitter
    • Youtube
    • Pinterest
    • TikTok
    • Instagram
    Select Country / Region:
    Country
    AndroidIOS

    About Lenovo

    • Our Company
    • News
    • Investors Relations
    • Compliance
    • ESG
    • Product Recycling
    • Product Security
    • Product Recalls
    • Executive Briefing Center
    • Lenovo Cares
    • Careers
    • Formula 1 Partnership

    Products & Services

    • Laptops & Ultrabooks
    • Smarter AI for You
    • Desktop Computers
    • Workstations
    • Gaming
    • Tablets
    • Servers, Storage, & Networking
    • Accessories & Software
    • Services & Warranty
    • Product FAQs
    • Outlet
    • Deals
    • Lenovo Coupons
    • Cloud Security Software
    • Windows 11 Upgrade

    Resources

    • Legion Gaming Community
    • Lenovo EDU Community
    • Lenovo Pro Community
    • Lenovo Pro for Business
    • My Lenovo Rewards
    • Lenovo Financing
    • Lenovo Trade-in
    • Affiliate Program
    • Affinity Program
    • Employee Purchase Program
    • Lenovo Partner Hub
    • Laptop Buying Guide
    • Where to Buy
    • Glossary

    Customer Support

    • Contact Us
    • Policy FAQs
    • Return Policy
    • Shipping Information
    • Order Lookup
    • Register a Product
    • Replacement Parts
    • Technical Support
    • Forums
    • Provide Feedback
    © 2025 Lenovo. All rights reserved.
    PrivacyCookie Consent ToolSite MapTerms of UseExternal Submission PolicySales terms and conditionsAnti-Slavery and Human Trafficking Statement
    Compare  ()
    x
    Call

    Need Help? Call: 

    1-800-426-7235
    Select Your Store
    Add items to your cart?
    We've noticed that you've entered a different store. Do you want to add these items to your cart in the new store?
    No Yes. Add in Lenovo Pro