Skip to content

TimeZone.currentSystemDefault() returns wrong time zone on Linux #517

Closed
@NANDcs

Description

@NANDcs

I'm on Ubuntu 24.04 noble with KDE 5.115.0 / Plasma 5.27.12 using library version 0.6.2.

Per the documentation for currentSystemDefault():

On Linux, this function queries the /etc/localtime symbolic link.

Looking at the /etc/localtime symlink:
localtime -> /usr/share/zoneinfo/America/New_York

However calling println(TimeZone.currentSystemDefault()) returns:
America/Los_Angeles

For context, last week I switched my time zone from Eastern to Pacific using the system settings. Switching it back fixes the system time in every other application except the KMP app I'm using (source code).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions