You've already forked AstralRinth
forked from didirus/AstralRinth
Secure auth route, fix quilt deps bug, optimize queries more (#374)
* Secure auth route, fix quilt deps bug, optimize queries more * Add to_lowercase for multiple hashes functions
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
// TODO: remove attr once routes are created
|
||||
|
||||
use thiserror::Error;
|
||||
use time::OffsetDateTime;
|
||||
|
||||
pub mod categories;
|
||||
pub mod ids;
|
||||
@@ -125,3 +126,11 @@ impl ids::ProjectTypeId {
|
||||
Ok(result.map(|r| ids::ProjectTypeId(r.id)))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn convert_postgres_date(input: &str) -> OffsetDateTime {
|
||||
OffsetDateTime::parse(
|
||||
format!("{}:00Z", input.replace(' ', "T")),
|
||||
time::Format::Rfc3339,
|
||||
)
|
||||
.unwrap_or_else(|_| OffsetDateTime::now_utc())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user