Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
city-country-timezone
Advanced tools
Find the timezone from countries given or city and country indicated.
Find timezone of any country, city or province
By passing a country, province or city you would get an object with the timezone of that location you indicated and then the difference in hours between that location you indicated and the location where the code is running (know as time_diff
). The location used to test this code is Odessa, Ukraine
which would determine the outcome of the time_diff
npm install city-country-timezone
const getTimeDiffAndTimeZone = require('city-country-timezone');
const country = "Los Angeles"; //city
const { timezone, time_diff } = getTimeDiffAndTimeZone(country);
console.log(`Timezone: ${timezone}, Time Difference: ${time_diff}`);
// Timezone: America/Santiago, Time Difference: -5
const getTimeDiffAndTimeZone = require('city-country-timezone');
const country = "Samara Region, Russian Federation"; //region and country
const { timezone, time_diff } = getTimeDiffAndTimeZone(country);
console.log(`Timezone: ${timezone}, Time Difference: ${time_diff}`);
// Timezone: Europe/Moscow, Time Difference: +1
const getTimeDiffAndTimeZone = require('city-country-timezone');
const country = "Lagos, Nigeria"; //city and country
const { timezone, time_diff } = getTimeDiffAndTimeZone(country);
console.log(`Timezone: ${timezone}, Time Difference: ${time_diff}`);
// Timezone: Africa/Lagos, Time Difference: -1
FAQs
Find the timezone from countries given or city and country indicated.
We found that city-country-timezone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.