system-time-updater
v0.0.5
Published
Updates system time using a given timestamp. Depending on the platform, it requires appropriate permissions. Both timestamps with and without milliseconds are valid.
Downloads
1
Maintainers
Readme
system-time-updater
Updates system time using a given timestamp. Depending on the platform, it requires appropriate permissions. Both timestamps with and without milliseconds are valid.
Instalation
npm i system-time-updater
Example
import { updateSystemDatetime } from 'system-time-updater';
//Linux and Windows
await updateSystemDatetime(1636541818000);
//On Linux you can add optional `sudo` to execute command
await updateSystemDatetime(1636541818000, {
sudo: true,
});