Skip to main content

get_local_time

Function get_local_time 

Source
pub fn get_local_time(
    date_stamp: i64,
    offset: i64,
) -> Result<DateTime<Local>, MessageError>
Expand description

Convert a raw Messages timestamp into local time.

offset is usually get_offset.

ยงExample

use imessage_database::util::dates::{get_local_time, get_offset};

let current_offset = get_offset();
let local = get_local_time(674526582885055488, current_offset).unwrap();