标签:UTC convert Zone time 显示 Fiori User Time 时区
Bug:
I created this Lead on 14:21 TimeZone is UTC+8. The change log should show time 14:21, but it show the CET time(6 hours gap).
![](https://user-images.githubusercontent.com/5669954/56943680-365c7f80-6b53-11e9-9da6-b0d6bf61bf3c.png)
Solution:
![](https://user-images.githubusercontent.com/5669954/56943681-365c7f80-6b53-11e9-8b3a-21a00666a16e.png)
Self-Configure:
Make clear there is two Personal Time Zone in the backend (User Time Zone and System Time Zone).
![](https://user-images.githubusercontent.com/5669954/56943682-36f51600-6b53-11e9-9f3d-533ddbc5bba1.png)
Key Point:
Make clear to the time convert during backend and frontend.
(1)In DB, it’s CET time.
![](https://user-images.githubusercontent.com/5669954/56943683-36f51600-6b53-11e9-8833-0868b1909fc6.png)
(2)In OneOrder, after select data from DB, we use below function, convert the CET time to User Time Zone.
![](https://user-images.githubusercontent.com/5669954/56943684-378dac80-6b53-11e9-85f3-2c84fef2c5a4.png)
(3)In our program, we can’t transport User Time Zone out to UI directly, we should convert User Time Zone to UTC and update it_ausg. (it’s better for UI to convert UTC to your browser time)
![](https://user-images.githubusercontent.com/5669954/56943685-378dac80-6b53-11e9-976d-09c7be905acf.png)
(4)In the frontend, we can just use one logic, convert UTC to local time.
![](https://user-images.githubusercontent.com/5669954/56943686-378dac80-6b53-11e9-9b33-a1d58c7e49bd.png)
It’s the process of time convert, be clear.要获取更多Jerry的原创文章,请关注公众号"汪子熙":
标签:UTC,convert,Zone,time,显示,Fiori,User,Time,时区 来源: https://blog.csdn.net/i042416/article/details/100553595
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。