You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: build.rs
    path of file: ./repos/artichoke
    
    the code of the file until where you have to start completion: #![warn(clippy::all)]
#![warn(clippy::pedantic)]
#![allow(clippy::restriction)]
#![allow(clippy::missing_panics_doc)]

use std::env;
use std::ffi::OsString;
use std::fmt;
use std::process::Command;
use std::str;

use tz::UtcDateTime;

#[derive(Default, Debug, Clone, Copy, Hash, Part
    
fn build_date() -> Date {
    // Enable reproducibility for `RUBY_RELEASE_DATE` and friends by respecting
    // the `SOURCE_DATE_EPOCH` env variable.
    //
    // https://reproducible-builds.org/docs/source-date-epoch/
    println!("cargo:rerun-if-env-changed=SOURCE_DATE_EPOCH");
    let datetime = if let Some(timestamp) = env::var_os("SOURCE_DATE_EPOCH") {
        let seconds_since_epoch = timestamp
            .into_string()
            .expect("SOURCE_DATE_EPOCH was not valid UTF-8")
            .parse::<i64>()
            .expect("SOURCE_DATE_EPOCH was not a valid integer");
        UtcDateTime::from_timespec(seconds_since_epoch, 0)
            .expect("Could not construct datetime from SOURCE_DATE_EPOCH")
    } else {
        UtcDateTime::now().expect("Could not retreive current timestamp")
    };
    datetime.into()
}