Open dpastoor opened 3 weeks ago
https://discord.com/channels/751419551132155925/801487468893175808/1200063991192502312
library(rextendr)
rust_function(r"{
fn now() -> Robj {
let now = chrono::Local::now();
let n2 = now.naive_local();
let posixct = Rfloat::from(n2.timestamp() as f64)
.into_robj()
.set_class(&["POSIXct", "POSIXt"])
.unwrap();
posixct
}}", dependencies = list("chrono" = "*"))
now()
#> [1] "2024-01-25 03:05:06 EST"
note this might not work as-is now due to changes in setting attributes that must be mutable now
Given the time is associated with when the file was added by dvs to the shared location