
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
js-joda-timezone
Advanced tools
Implementation of the js-joda ZoneRulesProvider, providing the bindings to the iana tzdb, using latest zone file generated by moment-timezone
Install joda using npm
npm install js-joda
npm install js-joda-timezone
const jsJoda = require('js-joda')
.use(require('js-joda-timezone'))
const { LocalDateTime, ZoneId, ZonedDateTime } = jsJoda;
LocalDateTime
.parse('2016-06-30T11:30')
.atZone(ZoneId.of('Europe/Berlin'))
.toString() // 2016-06-30T11:30+02:00[Europe/Berlin]
ZonedDateTime
.parse('2016-06-30T11:30+02:00[Europe/Berlin]')
.withZoneSameInstant(ZoneId.of('America/New_York'))
.toString() // 2016-06-30T05:30-04:00[America/New_York]
ZonedDateTime
.parse('2016-06-30T11:30+02:00[Europe/Berlin]')
.withZoneSameLocal(ZoneId.of('America/New_York'))
.toString() // 2016-06-30T11:30-04:00[America/New_York]
import { use as jsJodaUse, ZonedDateTime, ZoneId } from 'js-joda'
import jsJodaTimeZone from 'js-joda-timezone'
jsJodaUse(jsJodaTimeZone)
const zdt = ZonedDateTime.now(ZoneId.of('America/New_York'))
<script src="../dist/js-joda.js"></script>
<script src="../dist/js-joda-timezone.js"></script>
<script>
// use js-joda-timezone
JSJoda.use(JSJodaTimezone)
// copy all js-joda classes to the global scope
for(let key in JSJoda) { this[key] = JSJoda[key]; }
LocalDateTime
.parse('2016-06-30T11:30')
.atZone(ZoneId.of('Europe/Berlin'))
.toString() // 2016-06-30T11:30+02:00[Europe/Berlin]
ZonedDateTime
.parse('2016-06-30T11:30+02:00[Europe/Berlin]')
.withZoneSameInstant(ZoneId.of('America/New_York'))
.toString() // 2016-06-30T05:30-04:00[America/New_York]
ZonedDateTime
.parse('2016-06-30T11:30+02:00[Europe/Berlin]')
.withZoneSameLocal(ZoneId.of('America/New_York'))
.toString() // 2016-06-30T11:30-04:00[America/New_York]
</script>
js-joda-timezone is released under the BSD 3-clause license:
The author of joda time and the lead architect of the JSR-310 is Stephen Colebourne.
The packed json version of the iana tzdb is imported from moment-timezone package.
1.2.1
FAQs
iana tzdb timezone bindings for js-joda
The npm package js-joda-timezone receives a total of 889 weekly downloads. As such, js-joda-timezone popularity was classified as not popular.
We found that js-joda-timezone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.