round second to dropbox
This commit is contained in:
parent
dde4327249
commit
e228250613
@ -483,8 +483,8 @@ export const uploadToRemote = async (
|
|||||||
let ctime = 0;
|
let ctime = 0;
|
||||||
const s = await vault?.adapter?.stat(fileOrFolderPath);
|
const s = await vault?.adapter?.stat(fileOrFolderPath);
|
||||||
if (s !== undefined && s !== null) {
|
if (s !== undefined && s !== null) {
|
||||||
mtime = Math.round(s.mtime / 1000.0) * 1000;
|
mtime = Math.floor(s.mtime / 1000.0) * 1000;
|
||||||
ctime = Math.round(s.ctime / 1000.0) * 1000;
|
ctime = Math.floor(s.ctime / 1000.0) * 1000;
|
||||||
}
|
}
|
||||||
const mtimeStr = new Date(mtime).toISOString().replace(/\.\d{3}Z$/, "Z");
|
const mtimeStr = new Date(mtime).toISOString().replace(/\.\d{3}Z$/, "Z");
|
||||||
|
|
||||||
|
|||||||
@ -147,7 +147,7 @@ const copyEntityAndFixTimeFormat = (
|
|||||||
if (result.mtimeCli === 0) {
|
if (result.mtimeCli === 0) {
|
||||||
result.mtimeCli = undefined;
|
result.mtimeCli = undefined;
|
||||||
} else {
|
} else {
|
||||||
if (serviceType === "s3") {
|
if (serviceType === "s3" || serviceType === "dropbox") {
|
||||||
// round to second instead of millisecond
|
// round to second instead of millisecond
|
||||||
result.mtimeCli = Math.floor(result.mtimeCli / 1000.0) * 1000;
|
result.mtimeCli = Math.floor(result.mtimeCli / 1000.0) * 1000;
|
||||||
}
|
}
|
||||||
@ -158,7 +158,7 @@ const copyEntityAndFixTimeFormat = (
|
|||||||
if (result.mtimeSvr === 0) {
|
if (result.mtimeSvr === 0) {
|
||||||
result.mtimeSvr = undefined;
|
result.mtimeSvr = undefined;
|
||||||
} else {
|
} else {
|
||||||
if (serviceType === "s3") {
|
if (serviceType === "s3" || serviceType === "dropbox") {
|
||||||
// round to second instead of millisecond
|
// round to second instead of millisecond
|
||||||
result.mtimeSvr = Math.floor(result.mtimeSvr / 1000.0) * 1000;
|
result.mtimeSvr = Math.floor(result.mtimeSvr / 1000.0) * 1000;
|
||||||
}
|
}
|
||||||
@ -169,7 +169,7 @@ const copyEntityAndFixTimeFormat = (
|
|||||||
if (result.prevSyncTime === 0) {
|
if (result.prevSyncTime === 0) {
|
||||||
result.prevSyncTime = undefined;
|
result.prevSyncTime = undefined;
|
||||||
} else {
|
} else {
|
||||||
if (serviceType === "s3") {
|
if (serviceType === "s3" || serviceType === "dropbox") {
|
||||||
// round to second instead of millisecond
|
// round to second instead of millisecond
|
||||||
result.prevSyncTime = Math.floor(result.prevSyncTime / 1000.0) * 1000;
|
result.prevSyncTime = Math.floor(result.prevSyncTime / 1000.0) * 1000;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user