set-system-clock
Version:
Sets the system date and time.
26 lines (19 loc) • 562 B
Markdown
# Set-System-Clock
Sets the system date and time through the use of platform dependent commands.
Only supports Windows and Linux as of now.
## Installation
```
npm i set-system-clock -S
```
## API
### `DateTimeControl.setDateTime`
```js
// @dateTime - The date and time to set the system clock to
DateTimeControl.setDateTime(dateTime: Date);
```
## Code Example
```js
var DateTimeControl = require('set-system-clock');
// Sets the date and time to the date specified
DateTimeControl.setDateTime(new Date('8/1/2017 13:14:12'));
```