DEV Community

Cover image for Vibe coding: Time Zone Clock
Emil S
Emil S

Posted on

Vibe coding: Time Zone Clock

https://github.com/MarcialSegura/Time-Zone-Clock

Intro

Hi! This would actually be my first blog about anything computer science related since my days in college and this is something I've wanted to do for a while now, so thanks for tuning in! My goal with this blog is to not only document my projects but to remind myself that you can reach the end goal without following the beaded path. My use cases, workflow, code, implementation, etc may not be the best but nothing is truly perfect. I only want to prove that I can start and end a project and look back at it years from now and not second guess my work. I want to look back and remember where I started and far I've come.

Now, onto the topic at hand, vibe coding! Vibe coding was something that caught my eye ever since it showed up early of 2025, and coming from someone who doesn't code on the regular this was very interesting. The thought that an LLM can write code for you and helping user speed up workflows is what I was interested in. For a bit of added context, I'll explain where my idea for this project come from.

Early Beginnings

Recently, I've been getting into Homelabbing and turning older gear into a self hosted machine. I installed Proxmox onto a Dell Latitude and have been tinkering with it, finding projects for practical use cases. With that, I have an older Raspberry Pi 3 B+ housed in a Retroflag-NESPI case where I had Retropi installed for some old school gaming. But once I got my hands on a Steam Deck, that become my old school gaming console and I put the Raspberry Pi in a drawer for maybe a future project. Around 2019, I got my self a Rasepberry Pi 7 inch touch screen monitor which I originally wanted to mount to my main desktop setup as a music player/temperature reader. And, for a while this worked as I envisioned it. Then around early 2025 I removed it from the setup after upgrading to a larger monitor and didn't have the space for it. In the drawer it goes!

Fast forward to the end of 2025, I was digging in that same drawer for something else and came across both the touch screen and the Raspberry Pi and thought "what am I gonna do with this thing?". I didn't want to throw it away so I had to justify hanging onto it. Since I've been Homelabbing I did some research to see how can I utilize the Pi 3 B+ for maybe hosting a website or a virtual machine but long story short, I wanted to use the touch screen in conjunction with the Pi so I scrap that idea and thought about something practical. Back in one of my old SaaS remote jobs I supported users with medical documentations and helped troubleshoot technical issues like login, account management, database changes, etc. We supported users from across the USA and knowing their time zone was important. Being from the East Coast, you just have to count backwards in one hour increments and you'll get your CST, MST and PST. However, it would've been nice to have a clock on my desk with multiple time zones to help speed up that thought process. Plus, I wanted a way to look at the times without depending on a widget on my computer. Don't get me wrong, it's not that big of an issue but it's the level of convenience and speed is what a clock with different time zones is giving you. I believe back in the day, airports had clocks from different time zones cause not only did they need it but the tech wasn't there yet to implement something more convenient, thus the Time Zone Clock idea was born.

Brainstorming

Now to the meat and potatoes. I had no doubt there has to be some kind of open source tool out there to design and implement this idea, focusing on keeping it lightweight and simple. The idea was I want this app to sit on the Desktop as a executable whenever I needed it. I can also power on and power off the device with high durability, not worrying that the OS would break or give me issues from that. I knew that some version of Linux would be used and I oped for Raspberry Pi OS. It's light, and designed for Raspberry Pi's, and at worst case I can try Ubuntu. I've also used it in the past before I installed RetropPi on it. With that, I knew this would be the perfect chance to use an LLM to Vibe Code and see how close I can get to a finish product.

Ver 1

ChatGPT was my first LLM I've explored and I wouldn't be surprised if other LLM's can vibecode better but! I figured it would be too much overhead and time wasted to start a new so I stood with ChatGPT on this. I created a project and little by little I broke down what I wanted. I was surprised to see not only how quickly it found something but how it helped with exploring new ideas that I didn't even know you could do like creating a night mode. With my first prompt, it went something like this...

"I need help turning a rasepberry pi 3 b+ into a clock for me to reference but I want to have three different time zones displayed at a time. The rasepberry pi will be housed in a 7inch touch screen display. Help me find ideas, or free open source tools out there to install on it. Note that I have raspberry pi OS installed on the device."

ChatGPT understood the hardware and it's limitations, the touchscreen monitor and along with my requirements, we found and used Tkinter which runs on Python. The benefits were it was lightweight, no web stack, runs fast, no browser, no network dependency and customization options. What's really cool is I wanted to have a visual of this idea and requested ChatGPT to generate an image base on my idea and it gave me this.

I like it! Now let's give this a shot and see how close we can get.

From there, ChatGPT gave me the first script in Python. Install Python , Tkinter and it's instructions on how to display the clock. I honestly had my doubts but I was excited to see how this would look. Before I made a copy and ran this on the pi, I noticed that there were some small details that ChatGPT did on it's own and caused me to re-think the implementation to what I wanted. That's something I picked up on right away with vibe coding, you can't assume the LLM knows everything about your idea like you do. So it's important to either explain those small details in your prompts from the start, give it all the data you can so it can grasp the idea quicker and more accurately or make changes as you go. Some of those changes from Ver 1 was:

  • Changing the order of which the time zones where displayed. It wasn't in any particular order but I wanted the time EST to be at the bottom of the listed time zones.
  • Creating a Highlight for the EST time zone.
  • Adding a 12/24 hour option somewhere on the screen. Maybe add a button if the option was there.
  • Long pressing on the touchscreen or mouse press would exit the app. Before, it wanted to add an exit button on the top but I wanted the UI to be clean.
  • Change the origination to horizontal (Come to find out that it doesn't matter cause the origination is based on your OS settings so I won't need to make changes here).

Afterwards, I loaded it onto the Pi and ran the script. Here's Ver 1...

Honestly, for someone like me who doesn't live in code this was pretty cool.

Ver 2

What I like most about this app so far is how simple it is. I'm not spending hours testing it, it literately felt like plug and play. I confirmed that the times were correct, the screen stayed lit unless it's shut off or the app closes, the 12/24 hour format button worked and that the long presses of both the screen and mouse was working, etc. Now, I really just have to adjust the font size and add a night mode. Here's the second wave of changes...

  • Tune font size for exactly an 7 inch display.
  • Add in a night mode that turns on between 22:00–06:00.
  • Change font color to amber once night mode is toggled.

Now the pi's ready! Get it!? No? Okay...

What's left to do is create a Desktop Icon executable so I won't have to open up a text editor on the Pi every time I want to run the app.

And just like that this project is pretty much done! I had a couple hick-ups here and there. ChatGPT asking to clarify some prompts, requesting it to update the whole script rather than having myself open a text editor and adding it manually, file permission issues and file conversion issues. I'll add a link to a repo with install instructions and issues for those who are curious and maybe want to try this for yourself. I will likely return to this at a later time and think about how to use this for a DevOps project.

Note: The app was built for a Linux environment. Trying to run it on Windows will likely not work. App was also made for a smaller '7' inch display, running on larger displays can cause issues. Could possibly improve on these for a later version.

Conclusion

If you read this far thank you! I had fun working on this project and creating the blog. I wish I've done this sooner and I'm excited to write up some more blogs.

Top comments (0)