MCPcopy Create free account
hub / github.com/ccusage/ccusage / format_rfc3339_millis

Function format_rfc3339_millis

rust/crates/ccusage/src/date_utils.rs:270–282  ·  view source on GitHub ↗
(timestamp: TimestampMs)

Source from the content-addressed store, hash-verified

268}
269
270pub(crate) fn format_rfc3339_millis(timestamp: TimestampMs) -> String {
271 let parts = timestamp.utc_parts();
272 format!(
273 "{:04}-{:02}-{:02}T{:02}:{:02}:{:02}.{:03}Z",
274 parts.year,
275 parts.month,
276 parts.day,
277 parts.hour,
278 parts.minute,
279 parts.second,
280 parts.millisecond
281 )
282}
283
284pub(crate) fn local_parts(timestamp: TimestampMs) -> UtcParts {
285 let Ok(timestamp) = JiffTimestamp::from_millisecond(timestamp.as_millis()) else {

Callers 15

into_summaryMethod · 0.85
loaded_entryFunction · 0.85
create_blockFunction · 0.85
format_cache_dateFunction · 0.85
build_eventFunction · 0.85
load_chat_fileFunction · 0.85
message_value_to_entryFunction · 0.85
parse_otel_fileFunction · 0.85
message_value_to_entryFunction · 0.85
loaded_entryFunction · 0.85
settings_timestampFunction · 0.85
row_to_entryFunction · 0.85

Calls 1

utc_partsMethod · 0.80

Tested by

no test coverage detected