# Time Zones in Gnome Clocks get set correctly but then disappear during use

**URL:** https://discourse.nixos.org/t/time-zones-in-gnome-clocks-get-set-correctly-but-then-disappear-during-use/36797
**Category:** Help
**Created:** [December 13, 2023, 11:18am UTC](https://discourse.nixos.org/t/time-zones-in-gnome-clocks-get-set-correctly-but-then-disappear-during-use/36797 "2023-12-13T11:18:46Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nixpix](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/n/bbe5ce/32.png) [@nixpix](https://discourse.nixos.org/u/nixpix)
#### Post date: [December 13, 2023, 11:18am UTC](https://discourse.nixos.org/t/time-zones-in-gnome-clocks-get-set-correctly-but-then-disappear-during-use/36797/1 "2023-12-13T11:18:46Z")

</div>

I successfully declare two time zones for Gnome world clocks using home-manager. After logging in, the settings get applied and are displayed correctly when I click on the date and time widget. However after an indeterminate period of time (minutes not hours) if I click on the date and time widget again, the time zones are no longer displayed and instead an unset area is displayed with the text “Add world clock”. Does anyone have any idea what could be causing this?

Here is the relevant code snippet:

```auto
"org/gnome/shell/world-clocks" = {
            locations = [
              (mkVariant (mkTuple [
                (mkUint32 2)
                (mkVariant (mkTuple [
                  "Toronto"
                  "CYTZ"
                  true
                  [(mkTuple [ (0.76154532446909495) (-1.3857914260834978)]) ]
                  [(mkTuple [ (0.76212711252195475) (-1.3860823201099277)]) ]
                ]))
              ]))
              (mkVariant (mkTuple [
                (mkUint32 2)
                (mkVariant (mkTuple [
                  "London"
                  "EGWU"
                  true
                  [(mkTuple [ (0.89971722940307675) (-0.007272211034407213)]) ]
                  [(mkTuple [ (0.89884456477707964) (-0.0020362232784242244)]) ]
                ]))
              ]))              
            ];
          };

```

---

<div class="post-metadata">

### Author: ![kggx](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/k/c37758/32.png) [@kggx](https://discourse.nixos.org/u/kggx)
#### Post date: [March 31, 2024, 7:45am UTC](https://discourse.nixos.org/t/time-zones-in-gnome-clocks-get-set-correctly-but-then-disappear-during-use/36797/2 "2024-03-31T07:45:36Z")

</div>

I have the same issue but I think you need to add the locations also to the `org/gnome/clocks/world-clocks`. Similar to the weather module (`org/gnome/weather`).

The `org/gnome/clocks/world-clocks` module expects values like this (An array of location dictionaries):

```auto
[
    {'location': <(
            uint32 2, 
            <(
                    'Richmond', 
                    'KRIC', 
                    true, 
                    [(0.65469239303106264, -1.3495467494659847)], 
                    [(0.65543672359716076, -1.351936611357448)]
            )>
        )>
    },
    ... more location dictionaries
]

```

However I currently struggle to create the array of dictionary in home manager. Maybe someone with more nix and home manager experience can help here.

**EDIT:**  
Okay after some more trail and error I managed to solve the issue. (Changes according to the timezone needed)

```auto
"org/gnome/clocks" = {
      world-clocks = [
        ([ 
          (mkDictionaryEntry ["location" (mkVariant (mkTuple [
            (mkUint32 2)
            (mkVariant (mkTuple [
              "Kos"
              "LGKO"
              true
              [(mkTuple [(0.64199027070748338) (0.47240245669089603)])]
              [(mkTuple [(0.64391013288467702) (0.47628096226126287)])]
            ]))
          ]))])
        ])
        ([ 
          (mkDictionaryEntry ["location" (mkVariant (mkTuple [
            (mkUint32 2)
            (mkVariant (mkTuple [
              "Richmond"
              "KRIC"
              true
              [(mkTuple [(0.65469239303106264) (-1.3495467494659847)])]
              [(mkTuple [(0.65543672359716076) (-1.351936611357448)])]
            ]))
          ]))])
        ])
      ];
    };

```

---

<div class="post-metadata">

### Author: ![nixpix](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/n/bbe5ce/32.png) [@nixpix](https://discourse.nixos.org/u/nixpix)
#### Post date: [October 2, 2025, 12:02pm UTC](https://discourse.nixos.org/t/time-zones-in-gnome-clocks-get-set-correctly-but-then-disappear-during-use/36797/3 "2025-10-02T12:02:11Z")

</div>

Sorry for taking so long to check in. You’ve solved it! Thank you. 😀
