use std::env;
use chrono::{DateTime, TimeZone, Utc};
pub use crate::actions::run_with_update_check as run;
pub use crate::args::get_args as args;
pub(crate) mod actions;
pub(crate) mod args;
#[cfg(feature = "download")]
pub(crate) mod download;
pub mod find_postgres;
#[cfg(feature = "tamanu-alerts")]
pub(crate) mod postgres_to_value;
#[allow(dead_code)] pub(crate) const APP_NAME: &str = concat!(env!("CARGO_PKG_NAME"), "-", env!("CARGO_PKG_VERSION"));
#[cfg(doc)]
pub mod __help {
pub use crate::actions::*;
pub use crate::args::Args;
}
fn now_time<T: TimeZone>(tz: &T) -> DateTime<T> {
if cfg!(debug_assertions) && env::var("BESTOOL_MOCK_TIME").is_ok() {
DateTime::from_timestamp_nanos(0)
} else {
Utc::now()
}
.with_timezone(tz)
}