From dd8d8fdc4d3e43d3c7e7f48e4d7aacfd7b365b3e Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Mon, 28 Nov 2022 12:02:04 -0700 Subject: [PATCH] use unix epoch --- src/CONST.js | 1 + src/libs/OptionsListUtils.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CONST.js b/src/CONST.js index e1fbe4c194d39..a307f203d3e1f 100755 --- a/src/CONST.js +++ b/src/CONST.js @@ -40,6 +40,7 @@ const CONST = { }, DATE: { MOMENT_FORMAT_STRING: 'YYYY-MM-DD', + UNIX_EPOCH: '1970-01-01 00:00:00.000', }, SMS: { DOMAIN: '@expensify.sms', diff --git a/src/libs/OptionsListUtils.js b/src/libs/OptionsListUtils.js index 50c60eeea5a92..15c531aa6da95 100644 --- a/src/libs/OptionsListUtils.js +++ b/src/libs/OptionsListUtils.js @@ -464,7 +464,7 @@ function getOptions(reports, personalDetails, { // - All archived reports should remain at the bottom const orderedReports = _.sortBy(filteredReports, (report) => { if (ReportUtils.isArchivedRoom(report)) { - return -Infinity; + return CONST.DATE.UNIX_EPOCH; } return report.lastActionCreated;