package ptime

All checked builds pass
  1. Overview
  2. Docs
POSIX time for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ptime-1.2.0.tbz
sha512=b0c3240dd9e777a5e60b5269eb2e312fc644d29ef55e257d2f2538c03bf62274173ed36e13858c44d2dbee8fe375c9c483e705706e4aa5b3b5c4609ca6324a5c

Description

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

Tags

time posix system org:erratique

Added to opam-repository:

README

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.

Dependencies (4)

  1. topkg build & >= "1.0.3"
  2. ocamlbuild build & != "0.9.0"
  3. ocamlfind build
  4. ocaml >= "4.08.0"

Dev Dependencies

None

Optional Dependencies

None

  1. a2a-client
  2. activitypub
  3. albatross
  4. asn1-combinators != "0.2.5"
  5. atproto
  6. aws-eio
  7. aws-s3
  8. awskit
  9. awskit-eio
  10. awskit-lwt
  11. awskit-lwt-unix
  12. awskit-s3
  13. awskit-s3-eio
  14. awskit-s3-lwt
  15. awskit-s3-lwt-unix
  16. awskit-s3-sim
  17. awskit-unix
  18. builder
  19. builder-web
  20. ca-certs
  21. calculon >= "0.8"
  22. caldav
  23. canary
  24. capnp-rpc-net
  25. caqti
  26. carbon
  27. catala-lsp >= "1.0.0"
  28. certify
  29. chamelon
  30. clz
  31. cohttp-eio
  32. conan
  33. conex-mirage-crypto >= "1.0.0"
  34. conformist >= "0.5.0"
  35. cookie
  36. cookies
  37. crunch
  38. current_github
  39. current_gitlab >= "0.7.1"
  40. DkZero_Base
  41. daypack-lib
  42. dns >= "4.4.1"
  43. dns-cli
  44. dream >= "1.0.0~alpha3"
  45. dream-pure
  46. dream_middleware_ext
  47. fit >= "1.2.0"
  48. fluxt >= "0.0.1~beta2"
  49. forester >= "2.2.1"
  50. git-kv
  51. git-mirage
  52. git-unix >= "3.6.0" & < "3.16.1"
  53. http-date < "0.2"
  54. icalendar
  55. irmin-mirage
  56. irmin-pack-tools
  57. jekyll-format
  58. jose >= "0.9.0"
  59. jsonfeed
  60. jsonschema-validation
  61. junit
  62. jupyter-kernel >= "0.8"
  63. kube
  64. ledes
  65. letsencrypt
  66. letsencrypt-app
  67. letters
  68. little_logger >= "0.2.0"
  69. logs-syslog
  70. lwt-exit
  71. MlFront_Exec
  72. mastodon-archive-viewer
  73. mcp-kit
  74. memtrace-mirage
  75. minima-theme
  76. mirage-kv >= "6.0.1"
  77. mirage-kv-mem
  78. mirage-kv-unix
  79. mirage-logs
  80. mirage-ptime
  81. mkernel >= "0.0.3"
  82. mlgpx
  83. mrmime
  84. neodriver_core
  85. neodriver_eio >= "0.9.0"
  86. nloge
  87. ocaml-protoc-plugin >= "6.1.0"
  88. opentelemetry
  89. opium >= "0.19.0"
  90. otoggl
  91. paf
  92. pgx_value_ptime
  93. plebeia
  94. polymarket
  95. ppx_minidebug
  96. prettym
  97. prom
  98. proton
  99. raga
  100. rdf
  101. riot
  102. river
  103. rss
  104. SZXX >= "4.1.0"
  105. sitemap
  106. slacko >= "0.15.0"
  107. statocaml
  108. stk >= "0.2.0"
  109. stog >= "0.17.0"
  110. syndic >= "1.5"
  111. syslog-message
  112. syslog-rfc5424 < "0.2"
  113. tar-mirage
  114. telltime
  115. timedesc
  116. timere < "0.4.0"
  117. timere-parse < "0.0.5"
  118. timmy
  119. timmy-jsoo >= "1.1.5"
  120. timmy-unix >= "1.1.5"
  121. tiny_httpd >= "0.9"
  122. tls >= "0.12.8" & < "0.16.0" | >= "2.0.3"
  123. tls-async
  124. tls-eio >= "0.17.5"
  125. tls-lwt >= "0.17.5"
  126. tls-miou-unix
  127. tls-mirage
  128. webmachine >= "0.6.0"
  129. x509
  130. xapi-stdext-date

Conflicts

None

Build status

Results of building ptime with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
1.2.0 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure