Straightforward code does not work, and I cannot find any better API to do this, but the problem seems to be quite simple, I am sure other people tried it.
The following code gives me segmentation fault:
val metadataTime: Long = 1523720871L val mtRef: CValuesRef<time_tVar>? = metadataTime.toCPointer<time_tVar>() val gmtRef = gmtime(mtRef)
StableRef seems suitable, and I do not see other way to transform a