Skip to content

[WIP] Remove obsolete SbTimeZoneGetCurrent #6054

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jellefoks
Copy link
Member

This removes the now obsolete SbTimeZoneGetCurrent from Starboard

SbTimeZoneGetCurrent returned() data that is already in the tzdata included in ICU.

After #6048, the data can be acquired from 'timezone' after running tzset() instead, and completely consistent across platforms.

Bug: 406082846

@jellefoks jellefoks changed the title [WIP] Remove obsolete timezone stub [WIP] Remove obsolete SbTimeZoneGetCurrent Jun 10, 2025
This commit removes SbTimeZoneGetCurrent, StarboardExtensionTimeZoneApi, kStarboardExtensionTimeZoneName, and SbTimeZoneGetCurrentTest as they are no longer needed.
… done so far and provide feedback for Jules to continue.
I deleted the file `starboard/shared/stub/time_zone_get_current.cc` as it is obsolete.

I also verified that no occurrences of the corresponding function `SbTimezoneGetCurrent` remain in the codebase. This function was likely replaced by `SbTimeZoneGetName`.
The header file `starboard/extension/time_zone.h` was missing, causing a
build failure in `starboard/linux/shared/time_zone.cc`. This header defines
the `StarboardExtensionTimeZoneApi` used for setting the system timezone
via a Starboard extension.

This change recreates the header file based on its usage, which should
resolve the build error.

This also addresses the original issue of removing obsolete timezone-related
code:
- `time_zone_get_current.cc` files were confirmed to be absent.
- `SbTimezoneGetCurrent` function is not used in the codebase.
- The initially deleted `starboard/shared/stub/time_zone_get_current.cc`
  remains deleted as it was related to the obsolete `SbTimezoneGetCurrent`.
This commit addresses the issue of removing obsolete timezone-related code.

Changes I've made so far:
- Confirmed that `time_zone_get_current.cc` files mentioned in the original issue are not present.
- Confirmed that `SbTimezoneGetCurrent` function is not used.
- Deleted the stub file `starboard/shared/stub/time_zone_get_current.cc`.
- Reverted the accidental creation of `starboard/extension/time_zone.h`.
- Removed references to `starboard/extension/time_zone.h`, `StarboardExtensionTimeZoneApi`, and `kStarboardExtensionTimeZoneName` from the following files:
    - `starboard/linux/shared/time_zone.cc` (making it effectively empty)
    - `starboard/extension/extension_test.cc`
    - `starboard/linux/shared/system_get_extensions.cc`
    - `starboard/nplb/time_zone_get_name_test.cc`
    - `starboard/raspi/shared/system_get_extensions.cc`

Next steps based on your feedback:
- Remove the now-empty file `starboard/linux/shared/time_zone.cc`.
- Perform a final verification search across the entire repository to ensure no references to the obsolete extension API remain.
- Present the complete set of changes to you.

I'm presenting this commit now due to reaching the turn limit. The remaining steps will need to be addressed in a subsequent session.
@jellefoks jellefoks force-pushed the remove-obsolete-timezone-stub branch from 4cbc6f6 to b6c2e43 Compare June 11, 2025 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant