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