Merge branch 'test' into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Gerard 2019-03-05 14:12:20 +01:00
commit b0be963541
1 changed files with 7 additions and 3 deletions

View File

@ -9,9 +9,13 @@ dateTime.$inject = ['$filter'];
export default function dateTime($filter) { export default function dateTime($filter) {
return function(input, format) { return function(input, format) {
let value = new Date(input); let value;
let offset = value.getTimezoneOffset() * 60000; if (input) {
value.setTime(value.getTime() + offset); value = new Date(input);
let offset = value.getTimezoneOffset() * 60000;
value.setTime(value.getTime() + offset);
}
return $filter('date')(value, format); return $filter('date')(value, format);
}; };
} }