Newer Version Available
Localization
The following example shows how you can override the default timezone attribute. The output displays the time in the format hh:mm by default.
The component renders as Oct 7, 2013 2:17:08 AM.
This example creates a JavaScript Date instance, which is rendered in the format MMM DD, YYYY HH:MM:SS AM.
Additionally, you can use the global value provider, $Locale, to obtain the locale information. The locale settings in your organization overrides the browser’s locale information.
Working with Locale Information
In a single currency organization, Salesforce administrators set the currency locale, default language, default locale, and default time zone for their organizations. Users can set their individual language, locale, and time zone on their personal settings pages.
For example, setting the time zone on the Language & Time Zone page to (GMT+02:00) returns 28.09.2015 09:00:00 when you run the following code.
Running $A.get("$Locale.timezone") returns the time zone name, for example, Europe/Paris. For more information, see "Supported Time Zones" in the Salesforce Help.
Similarly, running $A.get("$Locale.currency") returns "¥" when your org’s currency locale is set to Japanese (Japan) - JPY. For more information, see "Supported Currencies" in the Salesforce Help.