Give gadgets the option to read current timezone used on wiki
Problem: Many wiki's use other timezones than UTC, some of them even alternate with daylight saving time (DST). As a result, some gadgets that use the current time on the wiki (Twinkle for example) have to be modified when ported to another wiki. Also, JavaScript does not have a nice solution to detect when a wiki goes in to DST. (An example is nlwiki switching between CET and CEST).
Proposed solution: Create a JavaScript variable (eg. mw.currenttimezone) with the time difference from UTC as its value.
Who would benefit: All wiki's that do not use UTC as their timezone.
You can use parseInt(mw.user.options.get('timecorrection').split('|')[1]) to get the time offset of the current user in minutes (this came up during code review recently, thanks to SD0001 for tracking down the solution). Not sure if there's an easy way to get the default time offset of the wiki, though (without making an API request). --Tgr (talk) 19:35, 29 January 2022 (UTC)Reply[reply]
Support it could also be handy if this were to be accessible through the API (for example for Toolforge-hosted tools) --Daniuu (talk) 11:09, 29 January 2022 (UTC)Reply[reply]
Support clear quality of life improvement. Natuur12 (talk) 16:56, 29 January 2022 (UTC)Reply[reply]
Support Not every wikis, especially smaller regional language wikis, use the UTC as their timezone. Thingofme (talk) 02:20, 30 January 2022 (UTC)Reply[reply]