mirror of https://github.com/LemmyNet/lemmy
* Handle invalid ban expires values (fixes #4045) * Adding a few missing expire time checks. Fixing up time conversions. (#4051) * Adding a few missing expire time checks. Fixing up time conversions. * Increase settings export wait time. * get rid of RemoveCommunity.expires * fmt * tests --------- Co-authored-by: Dessalines <dessalines@users.noreply.github.com>pull/3937/head^2
parent
d827af725a
commit
6d27bfed08
@ -1,5 +1,4 @@
|
||||
pub mod markdown;
|
||||
pub mod mention;
|
||||
pub mod slurs;
|
||||
pub mod time;
|
||||
pub mod validation;
|
||||
|
@ -1,12 +0,0 @@
|
||||
use chrono::{DateTime, TimeZone, Utc};
|
||||
|
||||
pub fn naive_from_unix(time: i64) -> DateTime<Utc> {
|
||||
Utc
|
||||
.timestamp_opt(time, 0)
|
||||
.single()
|
||||
.expect("convert datetime")
|
||||
}
|
||||
|
||||
pub fn convert_datetime(datetime: DateTime<Utc>) -> DateTime<Utc> {
|
||||
datetime
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
ALTER TABLE mod_remove_community
|
||||
ADD COLUMN expires timestamp;
|
||||
|
@ -0,0 +1,3 @@
|
||||
ALTER TABLE mod_remove_community
|
||||
DROP COLUMN expires;
|
||||
|
Loading…
Reference in New Issue