Skip to content

feature(timezone/locale): enable runtime adjustment, move to features#1772

Merged
brianmcgillion merged 3 commits intotiiuae:mainfrom
kajusnau:tz-locale-etc
Mar 6, 2026
Merged

feature(timezone/locale): enable runtime adjustment, move to features#1772
brianmcgillion merged 3 commits intotiiuae:mainfrom
kajusnau:tz-locale-etc

Conversation

@kajusnau
Copy link
Copy Markdown
Collaborator

@kajusnau kajusnau commented Feb 20, 2026

Description of Changes

Quick summary:

Timezone and locale settings moved to features
Timezone and locale can now be adjusted at runtime via COSMIC tools or any other tools.
Changes take effect immediately (timezone), after session restart (locale session config), or after system reboot (if system locale override is enabled).

Detailed changes:

  1. Timezone and locale module changes:
    • Timezone (ghaf.services.timezone):
      • Timezone changes are now monitored via systemd instead of a long-running dbus monitor
      • Added explicit timezone.propagate option to control propagation via givc
      • Changed the behavior of timezone.enable to instead control runtime mgmt of timezone on the target system
      • Enabling timezone.propagate now sets time.timeZone to null, which enables runtime mgmt
    • Locale(ghaf.services.locale):
      • Added explicit locale.propagate option to control propagation via givc
      • Changed the behavior of locale.enable to instead control runtime mgmt of locale on the target system
      • Implemented system locale overriding (shell, greeter, etc.) via locale.overrideSystemLocale (naming suggestions welcome).
      • Added persistent locale settings storage at /var/lib/locale/.locale-env, which will be imported by the global .profile at boot if locale.overrideSystemLocale == true.
      • Renamed locale handler services to better reflect their responsibilities
  2. Moved timezone and locale modules under features umbrella:
    • Can now be enabled on any VM via global config features
    • Timezone module (runtime mgmt) enabled on all sysvms by default
    • Locale module enabled on gui-vm by default
    • Locale and timezone propagation, and system locale overriding enabled only on gui-vm by default
    • Changed global config time.timeZone to null by default
  3. Fixed ghaf-intro not starting automatically:
    • Was caused by incorrect desktop entry naming
    • Changed to be launched via ghaf-open, which will determine the correct desktop entry automatically

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Closes/fixes:

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

Note

Fresh install is recommended for testing

Warning

Changing the locale (language) might result in localization occuring in the shell - e.g. some common shell utilities might have their output automatically translated to your selected language.

  1. Boot into Ghaf and begin the COSMIC initial setup flow
  2. Verify timezone and locale (language) pages show up in the initial setup
  3. Choose some custom timezone and locale and proceed until initial setup is finished
  4. Verify ghaf-intro opens automatically
  5. Verify gui-vm and other sysvms timezones are set to whatever you chose in initial setup
  6. Restart the session or reboot to verify locale changes have taken effect as well:
    • The login screen should display the date and time in the appropriate locale format (e.g. Finnish if Finnish locale was selected)
    • The DE apps and tools should show some signs of translation and time formatting based on the locale as well
  7. Verify locale and timezone can be adjusted freely within COSMIC Settings app, with changes taking effect:
    • Timezone changes take effect immediately
    • Locale changes take effect on session restart or reboot

Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
@kajusnau kajusnau changed the title Tz locale etc feature(timezone/locale): enable runtime adjustment, move to features Feb 23, 2026
@kajusnau kajusnau marked this pull request as ready for review February 23, 2026 10:00
@kajusnau kajusnau self-assigned this Feb 23, 2026
@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Feb 23, 2026
@Gaya-03

This comment was marked as outdated.

@Gaya-03 Gaya-03 added bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR Bug on System76 and removed Needs Testing CI Team to pre-verify labels Feb 24, 2026
@kajusnau

This comment was marked as outdated.

@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Feb 25, 2026
@Gaya-03
Copy link
Copy Markdown
Collaborator

Gaya-03 commented Feb 27, 2026

Retested this PR with the fix .
Issue 2 : The Preferred language changes from the COSMIC settings after the initial setup is not working - fixed
Issue 4 : This time after the fix , the date format changes correctly the second time but get stuck on 4th try . This is seen in both system76 and Lenovo

videos and logs shared directly with @kajusnau

@Gaya-03 Gaya-03 removed the Needs Testing CI Team to pre-verify label Feb 27, 2026
- implemented runtime mgmt of timezone and locale
- enablind these modules now enables runtime mgmt of both
- simplified tz forwarding to be triggered by systemd
- added persistent locale settings storage
- added .profile locale inheritance on boot
- added system-wide .profile locale inheritance on boot
- added explicit systemd services to handle locale mgmt and forwarding
- enabled timezone and locale pages in initial setup

Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
- exposed timezone and locale modules as features in global config
- enabled timezone and locale features in sysvms
- enabled timezone and locale propagation in gui-vm
- enabled system locale override in gui-vm
- set default time.timeZone to null in global config

Signed-off-by: Kajus Naujokaitis <kajus.naujokaitis@unikie.com>
@Gaya-03
Copy link
Copy Markdown
Collaborator

Gaya-03 commented Mar 2, 2026

Retest the issue after Kajus has adjusted the handler to wait for real locale changes before taking action . This time the issue is fixed except in a corner situation where language and formatting are different it picks up formatting on the date and time from the previously stored value . A minor corner case bug which we can separately .

@Gaya-03 Gaya-03 added Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76 and removed bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR Bug on System76 labels Mar 2, 2026
@brianmcgillion brianmcgillion merged commit 8253ee4 into tiiuae:main Mar 6, 2026
32 checks passed
@kajusnau kajusnau deleted the tz-locale-etc branch March 9, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants