Allow duplicate version numbers, fix version sorting, edit validators (#414)

This commit is contained in:
Geometrically
2022-08-06 17:44:16 -07:00
committed by GitHub
parent 411b8e3cb6
commit 33988ed3fb
7 changed files with 9 additions and 72 deletions

View File

@@ -128,7 +128,7 @@ impl ids::ProjectTypeId {
}
pub fn convert_postgres_date(input: &str) -> DateTime<Utc> {
DateTime::parse_from_rfc3339(&*format!("{}:00Z", input.replace(' ', "T")))
DateTime::parse_from_str(input, "%Y-%m-%d %T%#z")
.map(|x| x.with_timezone(&Utc))
.unwrap_or_else(|_| Utc::now())
}