pnp / sp-starter-kit

Modern SharePoint Starter Kit - End-to-end showcase solution to get started with modern experiences.
MIT License
754 stars 535 forks source link

World time web part not observing Daylight Saving timezones #193

Open CrackerboxOnline opened 5 years ago

CrackerboxOnline commented 5 years ago

Category

Expected or Desired Behavior

After first weekend in October much of Australia observes daylight saving time.

Time zones should change to (move forward 1 hour): South Australia (Adelaide UTC + 9:30) New South Wales, Victoria, Australian Capital Territory & Tasmania (Sydney/Melbourne/Hobart/Canberra UTC + 10:00)

The following time zones don't change: Western Australia (Perth UTC + 7:00) Northern Territory (Darwin UTC + 8:30) Queensland (Brisbane UTC + 9:00)

Times are restored to standard time on the first weekend in April the following year.

Observed Behavior

Time zones for the states that do not observe daylight savings appear to have also had their time zone shifted 1 hour forward.

Western Australia (Perth) currently UTC + 8:00) Northern Territory (Darwin UTC + 9:30) Queensland (Brisbane UTC + 10:00)

Adelaide, Sydney, Canberra, Melbourne and Hobart appear to be ok and showing the correct time zone shift.

Steps to Reproduce

Added 5 world time web parts to PnP Starter Kit portal home page. Set timezone for clocks to Adelaide, Perth, Darwin, Melbourne/Syndey, Brisbane. Compare times against known correct times. Google 'time in adelaide'. etc

NikNau commented 4 years ago

Any progress at all on this issue? It just makes clocks widget useless...

bcameron1231 commented 4 years ago

We are working through some other core updates to the Starter Kit currently. This is definitely in our backlog.

It is an open source project, so if there are changes you'd like to make to support your implementation, you are free to do so :)

NikNau commented 4 years ago

What would be investment to have it fixed?

eoverfield commented 4 years ago

Testing would be the most difficult aspect. The timezone offset is presented in the follow component: https://github.com/SharePoint/sp-starter-kit/blob/master/solution/src/webparts/worldTime/components/WorldTime.tsx.

timezone offset in JS is notoriously awful. https://medium.com/@toastui/handling-time-zone-in-javascript-547e67aa842d. If someone where to take this on, I suggest using MomentJS / react-moment to help with this. Again, I see testing across many timezones the most challenging and time consuming task here.

NikNau commented 4 years ago

thanks for clarification. meanwhile replaced with out of teh box clock widget, which seems to just work timezones or not