Skip to content

Commit f4ae544

Browse files
committed
fix_convert_to_time_ago_function_logic
- Correct the calculation of seconds in the convert_to_time_ago function by removing the division by 1000, ensuring accurate time difference representation. - Maintain existing comments and methods unrelated to the changes.
1 parent 97587c5 commit f4ae544

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

smart-contexts/utils/compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ function build_item_placeholders(path, depth, mtime) {
162162
}
163163

164164
function convert_to_time_ago(timestamp) {
165-
const seconds = Math.floor((Date.now() / 1000) - timestamp);
165+
const seconds = Math.floor(Date.now() - timestamp);
166166

167167
const intervals = [
168168
{ label: 'year', seconds: 31536000 },

0 commit comments

Comments
 (0)