system-clock
Advanced tools
+1
-1
| { | ||
| "name": "system-clock", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "description": "set system time, date and zone in os Windows", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/sid-max1996/system-clock.git", |
+3
-5
| # System Clock | ||
| Set system time, date and zone in os Windows. | ||
| Set system clock time and date in os Windows. System time sets in utc. | ||
| By default, you can change the time only as administrator, so configuration via gpedit.msc is required. | ||
@@ -8,7 +8,5 @@ | ||
| ```javascript | ||
| const displayRotate = require('display-rotate'); | ||
| const systemClock = require('system-clock'); | ||
| // setDateAndTime(day, month, year, hour, minute, sec) | ||
| const isSucc = systemClock.setDateAndTime(12, 5, 2020, 17, 0, 0); // set system date and time in utc | ||
| // setDateAndTime(bias) | ||
| isSucc = systemClock.setTimeZone(-120); // set timezone bias - utc offset in minutes | ||
| const isSucc = systemClock.setDateAndTime(12, 5, 2020, 17, 0, 0); | ||
| ``` |
@@ -63,7 +63,7 @@ #include <windows.h> | ||
| exports.Set( | ||
| "setTimeZone", Napi::Function::New(env, system_clock::setTimeZone) | ||
| ); | ||
| // exports.Set( | ||
| // "setTimeZone", Napi::Function::New(env, system_clock::setTimeZone) | ||
| // ); | ||
| return exports; | ||
| } |
4028
-2.89%12
-14.29%