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.
mongoose-timezone
Advanced tools
[![Build Status](https://travis-ci.org/rodrigogs/mongoose-timezone.svg?branch=master)](https://travis-ci.org/rodrigogs/mongoose-timezone) [![Code Climate](https://codeclimate.com/github/rodrigogs/mongoose-timezone/badges/gpa.svg)](https://codeclimate.com/
A mongoose plugin to normalize stored dates timezone. By default mongo dates are stored in UTC format, this behaviour may cause problems when using advanced aggregation queries or when retrieving those dates from another system with different timezone.
mongoose-timezone basically adds the current timezone offset to the date before store and removes the offset when retrieving data. This way dates are kept proportional in the database and in the app.
npm install mongoose-timezone --save
const mongoose = require('mongoose');
const timeZone = require('mongoose-timezone');
const Schema = new mongoose.Schema({
date: Date,
subDocument: {
subDate: {
type: Date,
},
},
});
// If no path is given, all date fields will be applied
Schema.plugin(timeZone, { paths: ['date', 'subDocument.subDate'] });
mongoose.model('Schema', Schema);
git checkout -b my-new-feature
git commit -m 'Add some feature'
git push origin my-new-feature
Licence © Rodrigo Gomes da Silva
FAQs
[![Build Status](https://travis-ci.org/rodrigogs/mongoose-timezone.svg?branch=master)](https://travis-ci.org/rodrigogs/mongoose-timezone) [![Code Climate](https://codeclimate.com/github/rodrigogs/mongoose-timezone/badges/gpa.svg)](https://codeclimate.com/
The npm package mongoose-timezone receives a total of 220 weekly downloads. As such, mongoose-timezone popularity was classified as not popular.
We found that mongoose-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.