mysql/mariadb lowest timestamp is actually 1970-01-01 00:00:01 (#1239)

This commit is contained in:
Athou
2024-02-09 17:31:22 +01:00
parent 23cff9c1e9
commit bda3ba4b5c
3 changed files with 5 additions and 2 deletions

View File

@@ -177,7 +177,7 @@ public class FeedRefreshUpdater {
if (!processed) {
// requeue asap
feed.setDisabledUntil(Instant.EPOCH);
feed.setDisabledUntil(Feed.MINIMUM_DISABLED_UNTIL);
}
if (inserted > 0) {

View File

@@ -15,6 +15,9 @@ import lombok.Setter;
@Setter
public class Feed extends AbstractModel {
// mariadb timestamp range starts at 1970-01-01 00:00:01
public static final Instant MINIMUM_DISABLED_UNTIL = Instant.EPOCH.plusSeconds(1);
/**
* The url of the feed
*/

View File

@@ -45,7 +45,7 @@ public class FeedService {
feed.setUrl(url);
feed.setNormalizedUrl(normalizedUrl);
feed.setNormalizedUrlHash(normalizedUrlHash);
feed.setDisabledUntil(Instant.EPOCH);
feed.setDisabledUntil(Feed.MINIMUM_DISABLED_UNTIL);
feedDAO.saveOrUpdate(feed);
}
return feed;