Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
function timeZoneOffsetInSeconds
import { timeZoneOffsetInSeconds } from "https://deno.land/x/neo4j_lite_client@4.4.6/core/internal/temporal-util.ts";

Get the time zone offset in seconds from the given standard JavaScript date.

Implementation note: Time zone offset returned by the standard JavaScript date is the difference, in minutes, from local time to UTC. So positive value means offset is behind UTC and negative value means it is ahead. For Neo4j temporal types, like Time or DateTime offset is in seconds and represents difference from UTC to local time. This is different from standard JavaScript dates and that's why implementation negates the returned value.

Parameters

standardDate: Date

the standard JavaScript date.

Returns

number

the time zone offset in seconds.