pub fn set_system_timezone(tz: Tz) -> Result<(), Error>Expand description
Sets the system timezone on Kobo devices.
§Kobo
This function performs three operations to ensure the timezone change is persistent and immediately reflected in the running process:
- Creates
/etc/localtimeas a symlink to the appropriate zoneinfo file (recognized by system utilities and the C library). - Writes the timezone name to
/etc/timezonefor persistence across reboots. - Updates the current process’s timezone state by setting the
TZenvironment variable and callinglibc::tzset(). This ensures that subsequent calls to libc time functions in this process reflect the new timezone immediately, rather than the system-wide timezone being adopted only after the process restarts.
§Errors
Returns an error if any filesystem operations fail.