Auto-indexing service and GraphQL API for AT Protocol Records quickslice.slices.network/
atproto gleam graphql
at main 14 lines 537 B view raw
1/// Timestamp utilities for ISO8601 formatting 2/// Convert microseconds since Unix epoch to ISO8601 format 3@external(erlang, "timestamp_ffi", "microseconds_to_iso8601") 4pub fn microseconds_to_iso8601(time_us: Int) -> String 5 6/// Get current timestamp in nanoseconds 7@external(erlang, "os", "system_time") 8fn system_time_native() -> Int 9 10/// Get current time as ISO8601 string 11pub fn current_iso8601() -> String { 12 // os:system_time() returns nanoseconds, convert to microseconds 13 microseconds_to_iso8601(system_time_native() / 1000) 14}