diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomMemberChangeIdentityCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomMemberChangeIdentityCmdExe.java index 470ce704..be8843b5 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomMemberChangeIdentityCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomMemberChangeIdentityCmdExe.java @@ -37,6 +37,8 @@ import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd; import com.red.circle.wallet.inner.model.enums.GoldOrigin; import java.math.BigDecimal; import java.math.RoundingMode; +import java.time.LocalDate; +import java.time.ZoneId; import java.util.Objects; import java.util.concurrent.TimeUnit; @@ -236,8 +238,11 @@ public class RoomMemberChangeIdentityCmdExe { if (Objects.isNull(roomMember)) { return; } - String createDate = roomMember.getCreateTime().toLocalDateTime().toLocalDate().toString(); - String todayDate = ZonedDateTimeAsiaRiyadhUtils.now().toLocalDate().toString(); + LocalDate createDate = roomMember.getCreateTime().toLocalDateTime() + .atZone(java.time.ZoneOffset.UTC) + .withZoneSameInstant(ZoneId.of("Asia/Riyadh")) + .toLocalDate(); + LocalDate todayDate = ZonedDateTimeAsiaRiyadhUtils.now().toLocalDate(); if (!createDate.equals(todayDate)) { return; }