Skip to content

Commit

Permalink
Refactor: DateTime format 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
noeyoes authored Mar 17, 2024
2 parents fafd14d + 35812a9 commit 191c3da
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ public abstract class BaseTimeEntity {

@PrePersist
public void onPrePersist(){
this.createdAt = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
this.modifiedAt = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
this.createdAt = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy.MM.dd HH:mm"));
this.modifiedAt = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy.MM.dd HH:mm"));
}

@PreUpdate
public void onPreUpdate() {
this.modifiedAt = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
this.modifiedAt = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy.MM.dd HH:mm"));
}
}

0 comments on commit 191c3da

Please sign in to comment.