fix: time related issues #179
1 changed files with 7 additions and 2 deletions
|
@ -6,8 +6,13 @@
|
|||
* @returns String
|
||||
*/
|
||||
export const showDate = (locale: Map<string, unknown>, date: Date) => {
|
||||
const timezoned = new Date(date.getTime());
|
||||
return `${timezoned.toDateString()} ${locale.get("u_time_at")} ${timezoned.toTimeString().split(" ")[0]}`;
|
||||
const timezoned = new Date(date.getTime() + date.getTimezoneOffset() * 60000);
|
||||
|
||||
console.log(date.getTimezoneOffset());
|
||||
|
||||
return `${timezoned.toDateString()} ${locale.get("u_time_at")} ${
|
||||
timezoned.toTimeString().split(" ")[0]
|
||||
}`;
|
||||
};
|
||||
|
||||
enum TimeSecond {
|
||||
|
|
Loading…
Reference in a new issue