Sp-dev-docs: TimeZoneInfo in 1.5 release is missing!

Created on 6 Jun 2018  路  9Comments  路  Source: SharePoint/sp-dev-docs

Category

  • [X] Question
  • [X] Bug

Expected or Desired Behavior

Up to SPFX 1.4.1 there was a timeZoneInfo property on SPUser and SPWeb in the pagecontext, which was now removed. This was one of the most useful properties. Why did you remove this? What should we use instead to get the current timezone settings of the user in order to display date and time correctly in our webparts?

Observed Behavior

In the d.ts file it states: "Excluded from this release type: timeZoneInfo" ...without further explanation.

spfx-general fixed-next-drop bug-suspected

All 9 comments

Looking into this one, it appears that it was switched from public to alpha. Total hack, but for now you could likely cast the object to any and then access the property (it's there, it's just no in the d.ts file).

Thanks for pointing these out.

Pat.

[edit]
OK, I see what happened. The TimeZoneInfo class was marked as alpha, and the property on the Web and User objects were marked as public (clearly a bad state to be in). We're improving our tooling to catch and resolve these issues (returning objects with a lower visibility from public methods, etc.). The resolution in this case was to mark the downstream methods as alpha as well, to ensure that anything that returns an alpha object is alpha / beta is beta / etc. I realize that doesn't solve your immediate situation - just explains it.

Thx @patmill this helps. If it is okay and supported to cast the object as any, I am happy with that. As long as the property stays there and has an actual value ;)

Just to follow up on this. We will be addressing this in the 1.5.1 release, which is coming soon.

This should be now addressed with the 1.5.1 release, so would request to validate the situation with following. Here are short release notes for 1.5.1 release - https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-for-SPFx-Package-Version-1.5.1.

This issue happend again in 1.6. timeZoneInfo is missing again. Please add this back again :)

Well crap.... Let me see what happened.

Hey @OliverZeiser - From the code / interfaces, it should be present in the -plusbeta packages. 1 - do you see the timezone APIs there and 2 - were they in the public 1.5.1 release, or the -plusbeta 1.5.1 release?

Hey pat, thanks for clarifying this and sorry.... You are right, they were part of the -plusbeta and now I upgraded my solution to 1.6 but not the plusbeta version of it this time. I think I got confused by the 1.6.0-dk.3 release from devktichen that had this included.
Well, but maybe you can take that as a feedback and move it to GA in 1.7 as I do not see any reason to keep it in the -plusbeta. It has been working just fine so far ;)

This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ralms picture Ralms  路  3Comments

ken-harris picture ken-harris  路  3Comments

waldekmastykarz picture waldekmastykarz  路  3Comments

zerovectorspace picture zerovectorspace  路  3Comments

bengtmoss picture bengtmoss  路  3Comments