diff --git a/example/localTimeSystem/bundle.js b/example/localTimeSystem/bundle.js index b7cb6f775b..1d1ff2cf39 100644 --- a/example/localTimeSystem/bundle.js +++ b/example/localTimeSystem/bundle.js @@ -33,7 +33,7 @@ define([ "extensions": { "formats": [ { - "key": "local", + "key": "local-format", "implementation": LocalTimeFormat } ], diff --git a/example/localTimeSystem/src/LocalTimeFormat.js b/example/localTimeSystem/src/LocalTimeFormat.js index f0aa91c529..a9b26ed4ef 100644 --- a/example/localTimeSystem/src/LocalTimeFormat.js +++ b/example/localTimeSystem/src/LocalTimeFormat.js @@ -26,11 +26,11 @@ define([ moment ) { - var DATE_FORMAT = "YYYY-MM-DD hh:mm:ss.SSS", + var DATE_FORMAT = "YYYY-MM-DD h:mm:ss.SSS a", DATE_FORMATS = [ DATE_FORMAT, - "YYYY-MM-DD hh:mm:ss", - "YYYY-MM-DD hh:mm", + "YYYY-MM-DD h:mm:ss a", + "YYYY-MM-DD h:mm a", "YYYY-MM-DD" ]; @@ -67,8 +67,8 @@ define([ return [ [".SSS", function(m) { return m.milliseconds(); }], [":ss", function(m) { return m.seconds(); }], - ["hh:mm", function(m) { return m.minutes(); }], - ["hh", function(m) { return m.hours(); }], + ["hh:mma", function(m) { return m.minutes(); }], + ["hha", function(m) { return m.hours(); }], ["ddd DD", function(m) { return m.days() && m.date() != 1; diff --git a/example/localTimeSystem/src/LocalTimeSystem.js b/example/localTimeSystem/src/LocalTimeSystem.js index 4c21e450e8..f8c2f28f86 100644 --- a/example/localTimeSystem/src/LocalTimeSystem.js +++ b/example/localTimeSystem/src/LocalTimeSystem.js @@ -42,11 +42,11 @@ define([ */ this.metadata = { 'key': 'local', - 'name': 'Local 12 hour', + 'name': 'Local', 'glyph': '\u0043' }; - this._formats = ['utc']; + this._formats = ['local-format']; this._tickSources = [new LocalClock($timeout, DEFAULT_PERIOD)]; } diff --git a/main.js b/main.js index 0c1d93f0a6..c2f8341aeb 100644 --- a/main.js +++ b/main.js @@ -105,8 +105,6 @@ define([ './platform/search/bundle', './platform/status/bundle', './platform/commonUI/regions/bundle' - //'./examples/localTimeSystem/bundle' - //'./example/msl/bundle' ], function (Main, legacyRegistry) { return { legacyRegistry: legacyRegistry, diff --git a/platform/features/conductor-v2/conductor/src/ui/TimeConductorController.js b/platform/features/conductor-v2/conductor/src/ui/TimeConductorController.js index 955f0118a9..9f6f095d34 100644 --- a/platform/features/conductor-v2/conductor/src/ui/TimeConductorController.js +++ b/platform/features/conductor-v2/conductor/src/ui/TimeConductorController.js @@ -212,10 +212,12 @@ define( this.$scope.timeSystemModel.options = this.selectedMode.timeSystems().map(function (timeSystem) { return timeSystem.metadata; }); - this.$scope.timeSystemModel.selected = timeSystem; + + this.setTimeSystem(timeSystem); + /*this.$scope.timeSystemModel.selected = timeSystem; //Use default format this.$scope.timeSystemModel.format = timeSystem.formats()[0]; - this.setDeltasFromTimeSystem(timeSystem); + this.setDeltasFromTimeSystem(timeSystem); */ } }; @@ -260,6 +262,7 @@ define( TimeConductorController.prototype.setTimeSystem = function (newTimeSystem) { if (newTimeSystem && newTimeSystem !== this.$scope.timeSystemModel.selected) { this.$scope.timeSystemModel.selected = newTimeSystem; + this.$scope.timeSystemModel.format = newTimeSystem.formats()[0]; var mode = this.selectedMode; mode.selectedTimeSystem(newTimeSystem); this.setDeltasFromTimeSystem(newTimeSystem);