I'm using the following plugin: http://code.google.com/p/jquery-localtime/wiki/Usage
My elements are rendered on the page with JS so I apply the plugin to the element as follows:
var format = "dd/MM/yy HH:mm a"; var localise = function () { jQuery(this).text(jQuery.localtime.toLocalTime(jQuery(this).text(), format)); }; jQuery(".localtime").each(localise); Problem is this results in the following error:
Uncaught Error: 01/06/12 14:43 PM is not a supported date/time string jquery.localtime-0.5.js:183 The text being passed to the plugin looks like this "2012-06-01T21:43:15Z" any ideas? Am I calling the plugin incorrectly? Thanks