Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/db/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ pub async fn read_available_channel_logs(
) -> Result<Vec<AvailableLogDate>> {
let timestamps: Vec<i32> = db
.query(
"SELECT toDateTime(toStartOfDay(timestamp)) AS date FROM message_structured WHERE channel_id = ? GROUP BY date ORDER BY date DESC",
"SELECT toDateTime(toStartOfDay(timestamp, 'UTC'), 'UTC') AS date FROM message_structured WHERE channel_id = ? GROUP BY date ORDER BY date DESC",
)
.bind(channel_id)
.fetch_all().await?;
Expand All @@ -164,7 +164,7 @@ pub async fn read_available_user_logs(
user_id: &str,
) -> Result<Vec<AvailableLogDate>> {
let timestamps: Vec<i32> = db
.query("SELECT toDateTime(toStartOfMonth(timestamp)) AS date FROM message_structured WHERE channel_id = ? AND user_id = ? GROUP BY date ORDER BY date DESC")
.query("SELECT toDateTime(toStartOfMonth(timestamp, 'UTC'), 'UTC') AS date FROM message_structured WHERE channel_id = ? AND user_id = ? GROUP BY date ORDER BY date DESC")
.bind(channel_id)
.bind(user_id)
.fetch_all().await?;
Expand Down