开发者

Error in Time difference between server and local system

开发者 https://www.devze.com 2023-01-30 11:18 出处:网络
I am capturing the object create time. In local system it displays the correct creattime but whenever the code runs on server it is displaying wrong time with difference of 4-5 hrs.

I am capturing the object create time. In local system it displays the correct creattime but whenever the code runs on server it is displaying wrong time with difference of 4-5 hrs. However, the difference between server and my local system is only 2开发者_如何学JAVA mins. Here is my code to capture the create time of object:---

object.setCreateTime(new Date());

Any suggestion please.

Thanks.


Change the System time zone in both local system and server.

0

精彩评论

暂无评论...
验证码 换一张
取 消