bug with filter giving wrong dates fixed
gitea/salix/test This commit looks good
Details
gitea/salix/test This commit looks good
Details
This commit is contained in:
parent
4fe4c7886b
commit
f5262954bc
|
@ -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);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue