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

china-time

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

china-time

Nodejs 获取北京时间。 当服务器不在东八区时,可以获取当前东八区的时间。

  • 0.12.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
311
decreased by-12.15%
Maintainers
1
Weekly downloads
 
Created
Source

china time

Nodejs 获取北京时间。 当服务器不在东八区时,可以获取当前东八区的时间。

download version license

install

yarn add china-time

if you prefer npm:

npm i china-time

usage

const chinaTime = require('china-time');

console.log(chinaTime()); // 2018-02-07T04:38:00.000Z
console.log(chinaTime().getTime()); // 1517978280000
console.log(chinaTime('YYYY-MM-DD HH:mm:ss')); // 2018-02-07 13:08:17
console.log(chinaTime('YY/MM/DD HH:mm')); // 18/02/07 13:08
console.log(chinaTime('YYYY MM DD')); // 2018 02 07

License

MIT License

Copyright (c) 2017-present, hwen hwenleung@gmail.com

Keywords

FAQs

Package last updated on 07 Feb 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