-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Description
Time-format function is not working correctly.
Steps to Reproduce
- The following code to be included in the main.rs
use jslt::Jslt;
use serde_json::json;
use std::fs;
fn main() -> Result<(), Box <dyn std::error::Error> > {
let jslt: Jslt = r#"
let timestamp = 1750245460.102
format-time($timestamp, "yyyy-MM-dd'T'HH:mm:ss'Z'")
"#.parse()?;
let input = json!({
"data": [
[1, 2, 3, 4, 5],
[6, 7, 8, 9, 10]
]
});
let output = jslt.transform_value(&input)?;
println!("{}",output);
assert_eq!("\"2025-06-18T11:17:40Z\"",output.to_string());
Ok(())
}
Actual Output
2025-06-18'T'11:17:40'Z'
Expected Output
2025-06-18T11:17:40Z
Environment
Nightly Rust Toolchain
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels