当前,我的AWS实例显示在时间以下
timedatectl status
**Local time:** Thu 2019-12-26 19:41:51 IST
Universal time: Thu 2019-12-26 14:11:51 UTC
RTC time: Thu 2019-12-26 14:11:51
Time zone: Asia/Kolkata (IST,+0530)
System clock synchronized: yes
systemd-timesyncd.service active: yes
RTC in local TZ: no
Pojo
@Entity
@Table(name = "hotel_booking")
public class Booking implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private Long id;
@Id
private Integer version;
@NotNull
@Column(name = "ota_reference_no",nullable = false)
private String referenceNo;
@Column(name = "guest_name")
private String guestName;
@Column(name = "created_date",columnDefinition = "timestamp",nullable = false)
private LocalDateTime createdDate;
@Column(name = "modified_date",columnDefinition = "timestamp")
private LocalDateTime modifiedDate;
======
一旦持久创建,则提交日期为世界标准时间,但必需为本地时间。
在localhost中获得相同的预期结果:
数据库使用: Postgres (即在AWS实例上本地安装)