Merge pull request #774 from ente-io/handling-negative-dateTime-value
improve invalid date string handling
This commit is contained in:
commit
d16078e3e4
|
@ -55,7 +55,8 @@ export function getUnixTimeInMicroSeconds(dateTime: Date) {
|
|||
return null;
|
||||
}
|
||||
const unixTime = dateTime.getTime() * 1000;
|
||||
if (unixTime <= 0) {
|
||||
//ignoring dateTimeString = "0000:00:00 00:00:00";
|
||||
if (unixTime === Date.UTC(0, 0, 0, 0, 0, 0, 0)) {
|
||||
return null;
|
||||
} else {
|
||||
return unixTime;
|
||||
|
|
Loading…
Reference in a new issue