New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

system-datetime

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

system-datetime

A node.js package to manage the system's date and time

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

SystemDatetime

ALERT: Setting methods require superuser permission. This package is not suitable for most applications.

How to use:

const systemdtz = require('system-datetime');

Datetime

Provides methods to get and set the system's date and time.

// Getting the date and time
systemdtz.datetime.get()
  .then(datetime => {
    // The date and time comes in a Date instance
    datetime;

    // Setting the date and time with a Date instance
    return systemdtz.datetime.set(datetime);
  })
  .then(datetime => {
    // The setting method also gets the date and time in a Date instance
  });

Timezone

Provides methods to get and set the system's timezone.

// Getting the timezone
systemdtz.timezone.get()
  .then(timezone => {
    // The timezone comes as a string with a content like America/Recife
    timezone;

    // Setting the date and time with a string with content like America/Recife
    return systemdtz.timezone.set(timezone);
  })
  .then(() => {
    // The timezone setting method returns nothing
  });

Keywords

FAQs

Package last updated on 27 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc