mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-18 12:50:30 +00:00
Corrected dateupload.
This commit is contained in:
@@ -141,9 +141,7 @@ class DefaultExtension extends MProvider {
|
|||||||
let timeZoneOffset = isInDST ? 0 : 1;
|
let timeZoneOffset = isInDST ? 0 : 1;
|
||||||
// If it's in CEST, subtract 1 hour from UTC (to get local time in CEST)
|
// If it's in CEST, subtract 1 hour from UTC (to get local time in CEST)
|
||||||
const correctedTime = new Date(jsDate.getTime() + (timeZoneOffset - 1) * 60 * 60 * 1000);
|
const correctedTime = new Date(jsDate.getTime() + (timeZoneOffset - 1) * 60 * 60 * 1000);
|
||||||
// Convert to epoch time
|
return String(correctedTime.valueOf()); // dateUpload is a string containing date expressed in millisecondsSinceEpoch.
|
||||||
const epochTime = Math.floor(correctedTime.getTime() / 1000);
|
|
||||||
return epochTime.toString(); // dateUpload is a string containing date expressed in millisecondsSinceEpoch.
|
|
||||||
}
|
}
|
||||||
async getVideoList(url) {
|
async getVideoList(url) {
|
||||||
const baseUrl = this.source.baseUrl;
|
const baseUrl = this.source.baseUrl;
|
||||||
|
|||||||
@@ -141,9 +141,7 @@ class DefaultExtension extends MProvider {
|
|||||||
let timeZoneOffset = isInDST ? 0 : 1;
|
let timeZoneOffset = isInDST ? 0 : 1;
|
||||||
// If it's in CEST, subtract 1 hour from UTC (to get local time in CEST)
|
// If it's in CEST, subtract 1 hour from UTC (to get local time in CEST)
|
||||||
const correctedTime = new Date(jsDate.getTime() + (timeZoneOffset - 1) * 60 * 60 * 1000);
|
const correctedTime = new Date(jsDate.getTime() + (timeZoneOffset - 1) * 60 * 60 * 1000);
|
||||||
// Convert to epoch time
|
return String(correctedTime.valueOf()); // dateUpload is a string containing date expressed in millisecondsSinceEpoch.
|
||||||
const epochTime = Math.floor(correctedTime.getTime() / 1000);
|
|
||||||
return epochTime.toString(); // dateUpload is a string containing date expressed in millisecondsSinceEpoch.
|
|
||||||
}
|
}
|
||||||
async getVideoList(url) {
|
async getVideoList(url) {
|
||||||
const baseUrl = this.source.baseUrl;
|
const baseUrl = this.source.baseUrl;
|
||||||
|
|||||||
Reference in New Issue
Block a user