on 2017 Apr 13 2:39 PM
We have encountered a weird issue when entering dates in Backoffice. For example when entering a date today (during daylight saving time) of 04.01.2016 00:00:00, it seems to be saved as 03.01.2016 23:00.00 (CET) in the database. So when formatting this date to a String you would also get "03.01.2016", which is wrong. The problem also occurs when saving a date of 04.01.2016 00:00:00 in the java code, which is then displayed as 04.01.2016 01:00:00 in the Backoffice. Is there some property we can set, or other means to deal with this problem? We would expect that exactly the date entered is saved in the database. Thanks in Advance.
Request clarification before answering.
Hi,
In backoffice listview label provider displays the timezone in server timezone ,where as in editor area date & time editors are in the timezone of user. Date is stored as timestamp(moment of time in db) , because of timezones its getting displayed in such way !
check this link to set timezone for an editor https://help.hybris.com/1808/hcd/8baaee208669101492bbcf156de5928f.html
if that doesn't help you can create your own editor extending these editors and set the timezone. Incase of list view you need to check "DefaultDateLabelProvider" and override it accordingly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Whats the solution?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
16 | |
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.