Skip to content

thecodingdhami/digital-clock.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

🕒 Digital Clock

A simple digital clock built using Python (Tkinter).
It displays the current time (HH:MM:SS) and date in real-time, updating every second.


📸 Screenshot


Digital Clock Screenshot


🚀 Features

  • 🕰️ Real-time clock with hours, minutes, and seconds
  • 📅 Displays the current date
  • 🖥️ Built with Tkinter

🧩 Tech Stack

  • Language: Python
  • GUI Framework: Tkinter
  • Module Used: time (strftime)

🧠 Working

The clock uses Python’s strftime() function to get the current time and date. The display updates every 1000 milliseconds (1 second) using Tkinter’s after() method.


💻 Installation & Usage

# 1️⃣ Clone the repository
git clone https://github.com/your-username/digital-clock.py.git

2️⃣ Navigate to the project folder

cd digital-clock

3️⃣ Run the program

python digital-clock.py


🧑‍💻 Customization

You can easily customize:

  • Font style and size
  • Background and foreground colors
  • Date/time format (e.g., 12-hour or 24-hour)

Example:

label = tk.Label(root, font=('Arial', 60, 'bold'),
                 background='#222', foreground='lime')
  

❤️ Author

Dinesh Singh Dhami
📧 dineshsingh@nast.edu.np
💻 GitHub Profile


⭐ If you like this project, don’t forget to give it a star on GitHub!

About

Digital Clock Using Tkinter Python

Topics

Resources

Stars

Watchers

Forks

Languages