Function built::util::strptime
[−]
[src]
pub fn strptime(s: &str) -> Tm
Parse a time-string as formatted by built
into a time::Tm
.
extern crate built; pub mod build_info { pub const BUILT_TIME_UTC: &'static str = "Tue, 14 Feb 2017 05:21:41 GMT"; } assert_eq!(built::util::strptime(&build_info::BUILT_TIME_UTC).tm_year, 117);
Panics
If the string can't be parsed. This should never happen with input provided
by built
.