Opened 8 years ago

Closed 7 years ago

#18186 closed defect (patchwelcome) does not localize the Time Zone String

Reported by: smathai Owned by:
Priority: undecided Milestone: 1.13
Component: Date Version: 1.9.3
Keywords: Cc:
Blocked By: Blocking:


If we create a dojo Date object, then use "dojo/date/locale" to format the date object using any formatLength option (example: "long" or "full") that also displays the Time Zone string, then the Time Zone portion of the string is always in English even if you change your browser's Locale/Language? setting to a different language.

var myDate = new Date();
var myStr = dateLocale.format(myDate, {formatLength: "long"});

This is the US English locale output:

July 23, 2014 at 2:57:50 PM Eastern Standard Time

This is the French locale output:

23 juillet 2014 14:57:50 Eastern Standard Time

Looking at the source code for shows this function comment:

// FIXME: This is not localized
date.getTimezoneName = function(/*Date*/dateObject){

Can this be fixed?

Attachments (1)

timeZoneStringNotTranslated.png (49.2 KB) - added by smathai 8 years ago.

Download all attachments as: .zip

Change History (2)

Changed 8 years ago by smathai

comment:1 Changed 7 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: newclosed

Given that no one has shown interest in creating a patch in more than a year, I'm closing this as patchwelcome. Please let us know if you would like to get involved in helping make this change to Dojo!

Note: See TracTickets for help on using tickets.