Use TLocale::Set() to set the system-wide locale settings.
All applications subsequently using locale information will honour these settings. Note that most applications do not need to change the locale settings, they merely honour them. In this case, Refresh() should be used to refresh the contents of a TLocale object with the system's locale settings.
To change the system locale and some of its locale-dependent date and time settings, implement code as follows:
... // Get current system locale information TLocale locale; // Change date separators 1 and 2 to hyphens; date separators 0 and 3 // remain null characters locale.SetDateSeparator('-',1); locale.SetDateSeparator('-',2); // set the locale to Southern hemisphere with // a +10 hour time offset locale.SetUniversalTimeOffset(36000); locale.SetHomeDaylightSavingZone(EDstSouthern); // Set daylight saving on for the southern hemisphere locale.SetDaylightSaving(EDstSouthern); // set system locale settings locale.Set(); ....
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.