fix: use seconds for timestamp values

kasts cannot work with ms value timestamps; it expects the timestamp to
be the unix timestamp in seconds
episode-actions
Jef Roosens 2025-03-04 19:43:11 +01:00
parent d8971f6c62
commit 2f974fd1ff
No known key found for this signature in database
GPG Key ID: 21FD3D77D56BAF49
2 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ impl gpodder::EpisodeActionRepository for SqliteRepository {
user: &gpodder::User,
actions: Vec<gpodder::EpisodeAction>,
) -> Result<i64, gpodder::AuthErr> {
let time_changed = chrono::Utc::now().timestamp_millis();
let time_changed = chrono::Utc::now().timestamp();
// TODO optimize this query
// 1. The lookup for a device could be replaced with a subquery, although Diesel seems to

View File

@ -44,7 +44,7 @@ impl gpodder::SubscriptionRepository for SqliteRepository {
urls: Vec<String>,
) -> Result<i64, gpodder::AuthErr> {
// TODO use a better timestamp
let timestamp = chrono::Utc::now().timestamp_millis();
let timestamp = chrono::Utc::now().timestamp();
self.pool.get()?.transaction(|conn| {
let device = devices::table