Socket
Socket
Sign inDemoInstall

date-fns-tz

Package Overview
Dependencies
1
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.1 to 3.1.2

2

dist/cjs/format/formatters/index.js

@@ -85,3 +85,3 @@ "use strict";

};
function getTimeZoneOffset(timeZone, originalDate) {
function getTimeZoneOffset(timeZone, originalDate = undefined) {
var _a;

@@ -88,0 +88,0 @@ const timeZoneOffset = timeZone

@@ -29,4 +29,4 @@ "use strict";

options = Object.assign(Object.assign({}, options), { timeZone, originalDate: date });
return (0, index_js_1.format)((0, index_js_2.toZonedTime)(date, timeZone), formatStr, options);
return (0, index_js_1.format)((0, index_js_2.toZonedTime)(date, timeZone, { timeZone: options.timeZone }), formatStr, options);
}
exports.formatInTimeZone = formatInTimeZone;

@@ -82,3 +82,3 @@ import { tzIntlTimeZoneName } from '../../_lib/tzIntlTimeZoneName/index.js';

};
function getTimeZoneOffset(timeZone, originalDate) {
function getTimeZoneOffset(timeZone, originalDate = undefined) {
const timeZoneOffset = timeZone

@@ -85,0 +85,0 @@ ? tzParseTimezone(timeZone, originalDate, true) / MILLISECONDS_IN_MINUTE

@@ -30,3 +30,3 @@ import { format } from '../format/index.js';

};
return format(toZonedTime(date, timeZone), formatStr, options);
return format(toZonedTime(date, timeZone, { timeZone: options.timeZone }), formatStr, options);
}
{
"name": "date-fns-tz",
"version": "3.1.1",
"version": "3.1.2",
"sideEffects": false,

@@ -5,0 +5,0 @@ "description": "Time zone support for date-fns v3 with the Intl API",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc