Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

switch back to utc

wangshifeng77ff3fd6c0af
diff --git a/screenpipe-server/src/bin/screenpipe-video.rs b/screenpipe-server/src/bin/screenpipe-video.rs
index e402cc5d3..33ba0925f 100644
--- a/screenpipe-server/src/bin/screenpipe-video.rs
+++ b/screenpipe-server/src/bin/screenpipe-video.rs
@@ -1,4 +1,4 @@
-use chrono::Local;
+use chrono::Utc;
use env_logger::Env;
use image::GenericImageView;
use log::info;
@@ -21,7 +21,7 @@ fn write_json_frame(writer: &mut BufWriter<File>, frame_data: &Value) -> std::io
fn main() {
env_logger::Builder::from_env(Env::default().default_filter_or("info")).init();
- let time = Local::now();
+ let time = Utc::now();
let formatted_time = time.format("%Y-%m-%d_%H-%M-%S").to_string();
let output_path = "data";
let json_output_path = format!("data/{}.json", formatted_time);
diff --git a/screenpipe-server/src/video.rs b/screenpipe-server/src/video.rs
index 1b8de6bb0..74d5d2341 100644
--- a/screenpipe-server/src/video.rs
+++ b/screenpipe-server/src/video.rs
@@ -1,4 +1,4 @@
-use chrono::Local;
+use chrono::Utc;
use ffmpeg_next as ffmpeg;
use ffmpeg_next::sys::AVSEEK_FLAG_FRAME;
use ffmpeg_next::{format, format::Pixel, media, software::scaling, util::frame::video::Video};
@@ -240,7 +240,7 @@ fn save_frames_as_video(
.write_to(&mut std::io::Cursor::new(&mut buffer), ImageFormat::Png)
.expect("Failed to encode first frame");
- let time = Local::now();
+ let time = Utc::now();
let formatted_time = time.format("%Y-%m-%d_%H-%M-%S").to_string();
// Start new FFmpeg process with a new output file
let output_file = format!("{}/{}.mp4", output_path, formatted_time);