Module Syslog_message.Rfc3164_Timestamp

RFC 3164 Timestamps

val encode : Ptime.t -> string

encode t is data, a timestamp in the presentation of RFC 3164.

val decode : string -> int -> (Ptime.t * string, [> `Msg of string ]) Stdlib.result

decode data year is Ok (timestamp, leftover), the decoded RFC 3164 timestamp and superfluous bytes, or Error e on parse failure.