Fakultas Ilmu Komputer UI

Commit e6afeeda authored by FadhilP's avatar FadhilP
Browse files

fix date time

parent c51fa07a
......@@ -2,9 +2,9 @@ import moment from 'moment';
function translate(time) {
try {
const date = moment(time).utcOffset(new Date().getTimezoneOffset() - 180)
const fullDate = moment(date).format('DD MMMM YYYY')
const timeStamp = moment(date).format('hh:mm A [WIB]')
const date = moment(time).add(7, 'h');
const fullDate = moment(date).format('DD MMMM YYYY');
const timeStamp = moment(date).format('hh:mm A [WIB]');
return `${fullDate}, ${timeStamp}`;
} catch (error) {}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment