SICKAppSpaceCodingStarterKit / CSK_Module_DateTime

Module to provide DateTime/NTP functionality.
MIT License
0 stars 1 forks source link

[BUG] - GMT+/- issue #1

Closed donald-sick closed 6 months ago

donald-sick commented 7 months ago

2 issues:

  1. The GMT+/- is not working properly.
  2. Using GMT+/- is not applicable for those has day light saving.

CSK module:

AppSpace device used:

To Reproduce
Steps to reproduce the behavior:

  1. On Australia Melbourne time zone
  2. Select GMT+10, it is only 1 hour later than GMT
  3. Select GMT+1 is 10 hour different from GMT

Expected behavior
Select Australia/Melbourne in the list instead of GMT+10. Time Zone will change between GMT+10 and GMT+11 for day light saving.

Additional context
DateTime.setTimeZone() supports IANA tz database format. The string 'GMT+1' is not IANA tz database format. So the design is wrong.

golluroSICKAG commented 7 months ago

Thank you for your bug report! So far we just created these timezones as in the past there was an issue, that not all possible timezones (like 'Australia/Melbourne') were accepted by all devices, so we just limited the scope to these "Etc/GMT" zones. But I will check this issue again and will try to find out if this can be improved / fixed.

golluroSICKAG commented 7 months ago

Hi!

I pushed a new version of the DateTime module, see this PR In this version it is possible to set a custom timezone via UI. The UI will respond if it was successful or not. So it should be possible to use e.g. "Australia/Melbourne" as timezone now.

Beside of this, 2 more things:

donald-sick commented 7 months ago

Tested the new version.

  1. Run the CSK_Module_DateTime in the AppStudio simulator. It is the only app running.
  2. Open the page, both the 'Select timezone' dropdown and 'Custom timezone' input box are showing 'Australia/Sydney'
  3. Change input box to 'Australia/Melbourne' then click Set Time button
  4. The dropdown and input box are set back to 'Australia/Sydney'

Expected behaviour: The input box won't change and dropdown is set to 'Australia/Melbourne'

golluroSICKAG commented 7 months ago

Please check following steps:

donald-sick commented 7 months ago

Tested on SIM2500, everything works as expected. My previous test was on emulator which doesn't have permission to change Windows timezone I guess.

golluroSICKAG commented 7 months ago

That sounds great! After an internal review this update will be merged. Kind regards!