New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@inrixia/set-system-clock

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inrixia/set-system-clock

Sets the system date and time.

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

Set-System-Clock

Sets the system date and time through the use of platform dependent commands.

Only supports Windows and Linux as of now.

This is a fork of @ConnorChristie/Set-System-Clock with updates & fixes such as async and timezone support from #4

Installation

npm i @inrixia/set-system-clock -s

API

DateTimeControl.setDateTime

// @dateTime - The date and time to set the system clock to
DateTimeControl.setDateTime(dateTime: Date);

Code Example

import DateTimeControl from "@inrixia/set-system-clock";
// or const DateTimeControl = require("set-system-clock");

// Sets the date and time to the date specified, returns a promise resolves once date/time is set
DateTimeControl.setDateTime(new Date("8/1/2017 13:14:12"));

Options:

// Use Sudo (Linux only)
DateTimeControl.setDateTime(new Date("8/1/2017 13:14:12"), { useSudo: true });

Keywords

time

FAQs

Package last updated on 05 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts