I am look to use Core_kernel.Time.t type and found out that it doesn’t have sexp functions, i.e. t_of_sexp, sexp_of_t etc?
All the modules that I am using from Core_kernel seem to have the above defined functions but it seems to be missing from Time.t. Curious as to why? And if we need Time.t sexpable, how do I go about doing it?
Core_kernel.Time.t is not directly sexpable like Core.Time.t because the default sexp serialization relies on the non-portable time zone code (i.e., Core.Time.Zone.local exists, but Core_kernel.Time.Zone.local does not).
As an alternative, you could use Core_kernel.Time.Stable.With_utc_sexp.V2.t, which is sexpable and uses UTC for its time zone.