Download node_modules/@aws-sdk/middleware-signing/dist-es/utils/getUpdatedSystemClockOffset.js from sweet2004/bot: direct link, hf CLI and curl.
- Browser
- Download file 339 Bytes
-
https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/middleware-signing/dist-es/utils/getUpdatedSystemClockOffset.js
- Command line
-
hf download hf://spaces/sweet2004/bot/node_modules/@aws-sdk/middleware-signing/dist-es/utils/getUpdatedSystemClockOffset.js
-
curl -L -o getUpdatedSystemClockOffset.js https://huggingface.co/spaces/sweet2004/bot/resolve/main/node_modules/%40aws-sdk/middleware-signing/dist-es/utils/getUpdatedSystemClockOffset.js
339 Bytes
| import { isClockSkewed } from "./isClockSkewed"; | |
| export const getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => { | |
| const clockTimeInMs = Date.parse(clockTime); | |
| if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) { | |
| return clockTimeInMs - Date.now(); | |
| } | |
| return currentSystemClockOffset; | |
| }; | |