metasfresh / metasfresh-webui-frontend-legacy

metasfresh Webui Frontend
GNU General Public License v2.0
57 stars 34 forks source link

Frontend shall ALWAYS use server's time zone #1933

Closed teosarca closed 5 years ago

teosarca commented 6 years ago

Is this a bug or feature request?

FR backend task: https://github.com/metasfresh/metasfresh-webui-api/issues/1064

What is the current behavior?

Frontend is using browser's timezone

Which are the steps to reproduce?

What is the expected or desired behavior?

Frontend shall use server's time zone.

Server's timezone is provided by /rest/api/userSession endpoint. e.g.

{
....
"timeZone": "+02:00",
...
}
teosarca commented 5 years ago

@siemiatj playing around i got OOM

image

teosarca commented 5 years ago

update: i think it was some buggy chrome plugin i've used to change my timezone.

metas-dh commented 5 years ago

Results of IT1 tested in mf15

pls see IT for https://github.com/metasfresh/metasfresh-webui-api/issues/1064#issuecomment-432213324: NOK

from teo's test, browser in EEST, server in CET: image pasted at 2018-10-23 15-38

metas-rc commented 5 years ago

I found the same problem in Date filters.

image

image

image

image

image

metas-rc commented 5 years ago

Case 2)

image

image

image

siemiatj commented 5 years ago

Can you record a video or give info what's happening, what data did you send and what did you get from the server ? The initial problem was that dates had different TZ locally and on the server. Server is +1 and I switched to Romanian TZ (+2). Before my changes time would change here to be an hour earlier. Now it's not happening anymore. So if it's not fixed I need to have a test case, expected outcome and so on :

http://recordit.co/hjmJAIW3m2

metas-rc commented 5 years ago

Hi. I recorded a video with what happens on my side. The problem seems to be that the frotend first sends the date with timezone +00:00 and only afterwards it's changed to +01:00 ( this is the server time zone). The results is that my filter Nov 1 -> Dec 1 turns into Nov 1 -> Dec 2

http://recordit.co/KdzMzSXyop

siemiatj commented 5 years ago

Might be related to #2202

siemiatj commented 5 years ago

Related to #2219