Skip to content

Commit

Permalink
💄 Use local timezone on display
Browse files Browse the repository at this point in the history
  • Loading branch information
siketyan committed Dec 18, 2020
1 parent 2018bdc commit e1dd34a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ mod api;
mod client;
mod video;

use chrono::Local;
use std::env::args;
use std::error::Error;

Expand All @@ -25,7 +26,12 @@ async fn main() -> Result<(), Box<dyn Error>> {
response_to_videos(response).expect("Failed to determine videos from the response.");

for video in videos {
println!("{}: {} ({})", video.id, video.title, video.scheduled_at);
println!(
"{}: {} ({})",
video.id,
video.title,
video.scheduled_at.with_timezone(&Local)
);
}

Ok(())
Expand Down

0 comments on commit e1dd34a

Please sign in to comment.