mte/unikernel/duniverse/ptime
2025-11-11 02:07:51 +01:00
..
doc 2025-11-11 02:07:51 +01:00
pkg 2025-11-11 02:07:51 +01:00
src 2025-11-11 02:07:51 +01:00
test 2025-11-11 02:07:51 +01:00
.gitignore 2025-11-11 02:07:51 +01:00
.merlin 2025-11-11 02:07:51 +01:00
.ocp-indent 2025-11-11 02:07:51 +01:00
_tags 2025-11-11 02:07:51 +01:00
B0.ml 2025-11-11 02:07:51 +01:00
BRZO 2025-11-11 02:07:51 +01:00
CHANGES.md 2025-11-11 02:07:51 +01:00
dune-project 2025-11-11 02:07:51 +01:00
LICENSE.md 2025-11-11 02:07:51 +01:00
myocamlbuild.ml 2025-11-11 02:07:51 +01:00
ptime.opam 2025-11-11 02:07:51 +01:00
README.md 2025-11-11 02:07:51 +01:00

Ptime — POSIX time for OCaml

Ptime has platform independent POSIX time support in pure OCaml. It provides a type to represent a well-defined range of POSIX timestamps with picosecond precision, conversion with date-time values, conversion with RFC 3339 timestamps and pretty printing to a human-readable, locale-independent representation.

The additional Ptime_clock library provides access to a system POSIX clock and to the system's current time zone offset.

Ptime is not a calendar library.

Ptime has no dependency. Ptime_clock depends on your system library or JavaScript runtime system. Ptime and its libraries are distributed under the ISC license.

Home page: http://erratique.ch/software/ptime

Installation

Ptime can be installed with opam:

opam install ptime

If you don't use opam consult the opam file for build instructions.

Documentation

The documentation can be consulted online or via odig doc mtime.

Questions are welcome but better asked on the OCaml forum than on the issue tracker.

Sample programs

See test/min_clock.ml.

If you installed ptime with opam sample programs are located in the directory opam var ptime:doc.