mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 01:47:41 +00:00
refactor: Remove current_date arg from relative_time_string_from_date.
The current_date argument was only used in tests and now we're using MockDate to set the current date.
This commit is contained in:
committed by
Tim Abbott
parent
3a233d73c1
commit
d5de26ff3b
@@ -59,15 +59,15 @@ export function populate_exports_table(exports: RealmExport[]): void {
|
||||
let deleted_timestamp = null;
|
||||
|
||||
if (data.failed_timestamp !== null) {
|
||||
failed_timestamp = timerender.relative_time_string_from_date({
|
||||
date: new Date(data.failed_timestamp * 1000),
|
||||
});
|
||||
failed_timestamp = timerender.relative_time_string_from_date(
|
||||
new Date(data.failed_timestamp * 1000),
|
||||
);
|
||||
}
|
||||
|
||||
if (data.deleted_timestamp !== null) {
|
||||
deleted_timestamp = timerender.relative_time_string_from_date({
|
||||
date: new Date(data.deleted_timestamp * 1000),
|
||||
});
|
||||
deleted_timestamp = timerender.relative_time_string_from_date(
|
||||
new Date(data.deleted_timestamp * 1000),
|
||||
);
|
||||
}
|
||||
|
||||
return render_admin_export_list({
|
||||
@@ -75,9 +75,9 @@ export function populate_exports_table(exports: RealmExport[]): void {
|
||||
id: data.id,
|
||||
acting_user: people.get_full_name(data.acting_user_id),
|
||||
// Convert seconds -> milliseconds
|
||||
event_time: timerender.relative_time_string_from_date({
|
||||
date: new Date(data.export_time * 1000),
|
||||
}),
|
||||
event_time: timerender.relative_time_string_from_date(
|
||||
new Date(data.export_time * 1000),
|
||||
),
|
||||
url: data.export_url,
|
||||
time_failed: failed_timestamp,
|
||||
pending: data.pending,
|
||||
|
||||
Reference in New Issue
Block a user