AnsweredAssumed Answered

Problem with retrieving date info in current locale format

Question asked by vladislavlysov on Mar 27, 2012
Latest reply on Mar 28, 2012 by davidcognite
Hello!
I  have a problem with retrieving date in user locale format. I have next webscript in alfresco:

(function () {
  var currentLocale = Packages.org.springframework.extensions.surf.util.I18NUtil.contentLocale,
        dateFormat = java.text.DateFormat.getDateTimeInstance(java.text.DateFormat.LONG, java.text.DateFormat.FULL, currentLocale);
  model.lastConnected = new Date().getTime();
  model.lastConnectedTime = dateFormat.format(obj.lastConnected);
… some code…
And in Share i retrive this information with Yahoo UI and put them to DataSource. When i change my locale in browser and do GET reqest from browser to the Alfresco webscript, i get right info in Germany locale. But when i retrieve this info from Share(from YUI script), i have info in "en" locale. I don't understand, why?
Thank you.

Outcomes