Refactor SystemWideAlert to use ZonedDateTime to fix bugs discovered via SystemWideAlertRestRepositoryIT

This commit is contained in:
Tim Donohue
2025-02-25 11:27:56 -06:00
parent 03fd92a877
commit 710b0fa040
8 changed files with 45 additions and 42 deletions

View File

@@ -9,7 +9,7 @@ package org.dspace.alerts;
import java.io.IOException;
import java.sql.SQLException;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.util.List;
import org.apache.logging.log4j.Logger;
@@ -39,7 +39,7 @@ public class SystemWideAlertServiceImpl implements SystemWideAlertService {
@Override
public SystemWideAlert create(final Context context, final String message,
final AllowSessionsEnum allowSessionsType,
final LocalDateTime countdownTo, final boolean active) throws SQLException,
final ZonedDateTime countdownTo, final boolean active) throws SQLException,
AuthorizeException {
if (!authorizeService.isAdmin(context)) {
throw new AuthorizeException(