mirror of https://github.com/abpframework/abp.git
2 changed files with 14 additions and 0 deletions
@ -0,0 +1,13 @@ |
|||||
|
export {}; |
||||
|
|
||||
|
declare global { |
||||
|
interface Date { |
||||
|
toLocalISOString(): string; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
Date.prototype.toLocalISOString = function(this: Date): string { |
||||
|
const timezoneOffset = this.getTimezoneOffset(); |
||||
|
|
||||
|
return new Date(this.getTime() - timezoneOffset * 60000).toISOString(); |
||||
|
}; |
||||
Loading…
Reference in new issue