openevse_esp32_firmware icon indicating copy to clipboard operation
openevse_esp32_firmware copied to clipboard

Local date format and its further processing

Open NJbubo opened this issue 2 years ago • 2 comments

The date and time showing wrong. Local date format is "2023. 09. 01". I think the local date and time format and its further processing is wrong method. It doesn't include these separator characters, and not where the program expects them. The year number not the last element of the date. Screenshot_1 Screenshot_2 Screenshot_3

NJbubo avatar Sep 01 '23 09:09 NJbubo

Screenshot_20230901-111204.png

The year and separator are down to the localisation settings of your OS/Browser I think so that is correct, but indeed there do seem to be a few rendering issues with those settings. What Timezone / language do you have your browser/OS set to and what Browser / OS are you using?

jeremypoulter avatar Sep 01 '23 10:09 jeremypoulter

Hi, My language and localisation settings : Hungarian. Timezone : Europe / Budapest. The pictures were taken in the android / chrome system. Same date in Windows 10 / Edge.

The "openevse-gui-v2/src/lib/utils.js" file 82 row: const arr = d.toLocaleString(DateTime.DATETIME_SHORT).split(" ") Your result with split (" "): arr[0] = date, arr[1] = time, arr[2] = AM or PM. My result with split (" "): arr[0] = year, arr[1] = month, arr[2] = day, arr[3] = time, ...

NJbubo avatar Sep 01 '23 11:09 NJbubo