Fixed weather date

This commit is contained in:
Max Lynch
2013-10-23 20:40:59 -05:00
parent 3a8bdbbc3d
commit 1932d9eb3c
3 changed files with 4 additions and 5 deletions

View File

@ -62,7 +62,7 @@ angular.module('ionic.weather', ['ionic.weather.services', 'ionic.weather.direct
if($scope.bgImages) {
$scope.activeBgImage = $scope.bgImages[$scope.activeBgImageIndex++ % $scope.bgImages.length];
}
$timeout(cycle, 5000);
$timeout(cycle, 10000);
});
};

View File

@ -7,12 +7,11 @@ angular.module('ionic.weather.directives', [])
template: '<span class="current-time">{{currentTime}}</span>',
scope: {
localtz: '=',
localTime: '='
},
link: function($scope, $element, $attr) {
$timeout(function checkTime() {
if($scope.localTime && $scope.localtz) {
$scope.currentTime = $filter('date')(parseInt($scope.localTime), 'h:mm') + $scope.localtz;
if($scope.localtz) {
$scope.currentTime = $filter('date')(+(new Date), 'h:mm') + $scope.localtz;
}
$timeout(checkTime, 500);
});

View File

@ -26,7 +26,7 @@
<header id="header" class="bar bar-header bar-clear">
<h1 class="title">
<span class="city">{{current.display_location.city}}</span><br>
<current-time local-time="current.local_epoch" localtz="current.local_tz_short"></current-time>
<current-time localtz="current.local_tz_short"></current-time>
</h1>
</header>
<div id="scroller" class="scroll padding" style="margin-top:44px">