Skip to content
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

[NPLB] Support SetTimeZone extension on Xbox #4281

Closed
wants to merge 1 commit into from

Conversation

MarekLuxoft
Copy link
Collaborator

In order to test SbTimeZoneGetCurrent(), we need to set a time zone first. Here we add a new time zone API as a starboard extension to set time zone.

b/301980900

Copy link

google-cla bot commented Oct 18, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@MarekLuxoft MarekLuxoft changed the title [NPLB] Support SetTimeZone extension on win and Xbox [NPLB] Support SetTimeZone extension on Xbox Oct 22, 2024
namespace {

bool SetTimeZone(const char* time_zone_name) {
Windows::Globalization::Calendar ^ calendar = ref new Windows::Globalization::Calendar();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need a new object of Calendar? I think you need just update object that you already have in the TimeZoneString class. New method SetTimeZone might be added to that class and this function will be as
bool SetTimeZone (const char* time_zone_name) {
TimeZoneString::Get()->SetTimeZone(time_zone_name);
}
Also you can move TimeZoneString class to this file and rename it to be consistent to its functionality

@MarekLuxoft
Copy link
Collaborator Author

This PR was only as POC, so I closed it to avoid confusion

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.

2 participants