Compare commits

...

2 Commits

Author SHA1 Message Date
√(noham)²
17898d11af Add timezone instructions for clock features 2025-11-11 16:58:10 +01:00
√(noham)²
ab274a7511 Update UTC calculation in getCestTime functions 2025-11-11 16:56:04 +01:00
5 changed files with 17 additions and 4 deletions

View File

@ -17,7 +17,9 @@ AFFECT [[4911547370760691430]]
function getCestTime() { function getCestTime() {
~&197102514&~ now = new ~&6502586279&~(); ~&197102514&~ now = new ~&6502586279&~();
~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000); ; to add a timezone:
; ~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000);
~&197102514&~ utc = now.getTime();
~&197102514&~ cestTime = new ~&6502586279&~(utc + (2 * 3600000)); /* UTC + 2 hours ~&197102514&~ cestTime = new ~&6502586279&~(utc + (2 * 3600000)); /* UTC + 2 hours
*/ */
~&7083121450889&~ cestTime; ~&7083121450889&~ cestTime;

View File

@ -20,7 +20,9 @@ AFFECT [[12542166428983872557]]
function getCestTime() { function getCestTime() {
~&197102514&~ now = new ~&6502586279&~(); ~&197102514&~ now = new ~&6502586279&~();
~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000); ; to add a timezone:
; ~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000);
~&197102514&~ utc = now.getTime();
~&7083121450889&~ new ~&6502586279&~(utc + cestOffset); ~&7083121450889&~ new ~&6502586279&~(utc + cestOffset);
} }

View File

@ -17,7 +17,9 @@ AFFECT [[4911547370760691430]]
function getCestTime() { function getCestTime() {
~&197102514&~ now = new ~&6502586279&~(); ~&197102514&~ now = new ~&6502586279&~();
~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000); ; to add a timezone:
; ~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000);
~&197102514&~ utc = now.getTime();
~&197102514&~ cestTime = new ~&6502586279&~(utc + (1 * 3600000)); /* UTC + 1 hours ~&197102514&~ cestTime = new ~&6502586279&~(utc + (1 * 3600000)); /* UTC + 1 hours
*/ */
~&7083121450889&~ cestTime; ~&7083121450889&~ cestTime;

View File

@ -20,7 +20,9 @@ AFFECT [[12542166428983872557]]
function getCestTime() { function getCestTime() {
~&197102514&~ now = new ~&6502586279&~(); ~&197102514&~ now = new ~&6502586279&~();
~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000); ; to add a timezone:
; ~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000);
~&197102514&~ utc = now.getTime();
~&7083121450889&~ new ~&6502586279&~(utc + cestOffset); ~&7083121450889&~ new ~&6502586279&~(utc + cestOffset);
} }

View File

@ -26,10 +26,15 @@ Beta releases are not tested nor supported.
- Adds a live clock to the library sidebar; tap the entry to toggle seconds display. - Adds a live clock to the library sidebar; tap the entry to toggle seconds display.
![Sidebar clock showing minutes](images/clock_1.png) ![Sidebar clock showing minutes](images/clock_1.png)
![Sidebar clock showing seconds](images/clock_2.png) ![Sidebar clock showing seconds](images/clock_2.png)
Note: You can add a timezone by editing the `clock.qmd` file and changing the timezone string in the line:
```
~&197102514&~ utc = now.getTime() + (now.getTimezoneOffset() * 60000);
```
#### `quickSettingsClock.qmd` #### `quickSettingsClock.qmd`
- Injects a tappable clock into the Quick Settings header; tap to toggle between minute and second precision. - Injects a tappable clock into the Quick Settings header; tap to toggle between minute and second precision.
![Quick settings clock](images/quickSettingsClock.png) ![Quick settings clock](images/quickSettingsClock.png)
Note: You can add a timezone by editing the `quickSettingsClock.qmd`, see above for details.
#### `forceSync.qmd` #### `forceSync.qmd`
- Adds a cloud button in Quick Settings that forces a library sync when tapped (need further testing to confirm it works as intended). - Adds a cloud button in Quick Settings that forces a library sync when tapped (need further testing to confirm it works as intended).