Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
parseDateWithCurrenTimezone: handle Date objects
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Jan 30, 2018
1 parent 0bdbc80 commit 86d57d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/actions/WindowActions.js
Expand Up @@ -1154,7 +1154,9 @@ export function parseToDisplay(fieldsByName) {
// i.e 2018-01-27T17:00:00.000-06:00
export function parseDateWithCurrenTimezone(value) {
if (value) {
if (Moment.isMoment(value)) {
if (value instanceof Date) {
return value;
} else if (Moment.isMoment(value)) {
return new Date(value);
} else {
const TIMEZONE_STRING_LENGTH = 7;
Expand Down

0 comments on commit 86d57d2

Please sign in to comment.