---
name: "uuid_time"
section: "3"
platform: "linux"
package: "util-linux-libs"
version: "2.42.4-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/uuid_time"
---

# uuid\_time(3)

extract the time at which the UUID was created

## NAME

uuid\_time - extract the time at which the UUID was created

## SYNOPSIS

**#include \<uuid.h\>**

**time\_t uuid\_time(const uuid\_t** *uu***, struct timeval \****ret\_tv***)**

## DESCRIPTION

*The* **uuid\_time***() function extracts the time at which the supplied time-based UUID uu was created. Note that the UUID creation time is only encoded within certain types of UUIDs. This function can only reasonably expect to extract the creation time for UUIDs created with the* **uuid\_generate\_time***(3) and* **uuid\_generate\_time\_safe***(3) functions. It may or may not work with UUIDs created by other mechanisms.*

## RETURN VALUE

*The time at which the UUID was created, in seconds since January 1, 1970 GMT (the epoch), is returned (see* **time***(2)). The time at which the UUID was created, in seconds and microseconds since the epoch, is also stored in the location pointed to by ret\_tv (see* **gettimeofday***(2)).*

## AUTHORS

*Theodore Y. Ts’o*

## SEE ALSO

**uuid***(3),* **uuid\_clear***(3),* **uuid\_compare***(3),* **uuid\_copy***(3),* **uuid\_generate***(3),* **uuid\_is\_null***(3),* **uuid\_parse***(3),* **uuid\_unparse***(3)*

## REPORTING BUGS

*For bug reports, use the* *issue tracker \<https://github.com/util-linux/util-linux/issues\>.*

## AVAILABILITY

*The* **libuuid** *library is part of the util-linux package since version 2.15.1. It can be downloaded from* *Linux Kernel Archive \<https://www.kernel.org/pub/linux/utils/util-linux/\>.*
