UNPKG

node-aurora

Version:

Provides an interface to the Aurora Dreamband.

11 lines (7 loc) 455 B
'use strict'; module.exports = function () { var connector = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'any'; var date = new Date(); var msAfterMidnight = date.getHours() * 3600000 + date.getMinutes() * 60000 + date.getSeconds() * 1000 + date.getMilliseconds(); return this.queueCmd('clock-set ' + date.getFullYear() + ' ' + (date.getMonth() + 1) + ' ' + date.getDate() + ' ' + msAfterMidnight, connector); };