# How to get the current (date)time and add one hour to it?

**URL:** <https://ziggit.dev/t/how-to-get-the-current-date-time-and-add-one-hour-to-it/13833>\
**Category:** Help\
**Tags:** standard-library\
**Created:** [January 6, 2026, 4:57pm UTC](https://ziggit.dev/t/how-to-get-the-current-date-time-and-add-one-hour-to-it/13833 "2026-01-06T16:57:26Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![FObersteiner](https://ziggit.dev/user_avatar/ziggit.dev/fobersteiner/32/1177_2.png) [@FObersteiner](https://ziggit.dev/u/FObersteiner)\
**Post date:** [January 8, 2026, 6:30am UTC](https://ziggit.dev/t/how-to-get-the-current-date-time-and-add-one-hour-to-it/13833/7 "2026-01-08T06:30:18Z")

</div>

related: [State of datetime handling in Zig?](https://ziggit.dev/t/state-of-datetime-handling-in-zig/2149)

> [@saurabh](#):
>
> Another downside is that libraries are likely (and rightly so) at a point release. I’m aiming to be as close to `master` as possible

I’ve took up the task of trying to track Zig master more closely with [FObersteiner/zdt: Datetime, Timezones and Durations in Zig - Codeberg.org](https://codeberg.org/FObersteiner/zdt) recently, and all I can say is this can be a big adventure. Not to depreciate Zig in any way, but you have to know what you’re up to, especially since “documentation” for the most recent changes means “read source and git diffs”.

So in principle, I’m with you on this one. Datetime handling can be so fundamental, you’d want to have it in std. I’m writing this despite having my own third party dt lib 😛 - And years of experience with using Python (dt as part of std, timezone not for a long time - big mess!) and go (dt + timezones as part of std - great!).

* * *

> [@LucasSantos91](#):
>
> the way to do it is

You could also use `std.Io.Clock.real.now(io)`, to get a Timestamp, no need to dive into the vtable.

---

_[View the full topic](https://ziggit.dev/t/how-to-get-the-current-date-time-and-add-one-hour-to-it/13833)._
