Skip to content

Commit

Permalink
feat: 도커 시간대 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
jeong011010 committed Oct 15, 2024
1 parent b66029a commit fc48ee0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ services:
- VAULT_TOKEN=${VAULT_TOKEN}
- VAULT_BACKEND=${VAULT_BACKEND}
- VAULT_DEFAULT_CONTEXT=${VAULT_DEFAULT_CONTEXT}
- TZ=Asia/Seoul # 시간대 설정 추가
ports:
- "8080:8080"
restart: on-failure
Expand All @@ -20,8 +19,6 @@ services:
nginx:
container_name: nginx
image: ${DOCKER_REPOSITORY_NGINX}:latest
environment:
- TZ=Asia/Seoul # 시간대 설정 추가
ports:
- 80:80
- 443:443
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import lombok.Getter;

import java.time.LocalDateTime;
import java.time.ZoneOffset;

@Getter
@Entity
Expand All @@ -31,11 +32,11 @@ public EmailVerificationToken() {
public EmailVerificationToken(String token, User user) {
this.token = token;
this.user = user;
this.expiryDate = LocalDateTime.now().plusMinutes(5); // 유효시간 5분
this.expiryDate = LocalDateTime.now(ZoneOffset.UTC).plusMinutes(5); // 유효시간 5분
}

public boolean isExpired() {
return LocalDateTime.now().isAfter(this.expiryDate);
return LocalDateTime.now(ZoneOffset.UTC).isAfter(this.expiryDate);
}

}

0 comments on commit fc48ee0

Please sign in to comment.