
Security News
Scaling Socket from Zero to 10,000+ Organizations
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.
@totalpave/cordova-plugin-date
Advanced tools
Cordova plugin to interface with TrueTime's Android and iOS NTP libaries.
Cordova plugin to interface with the Android and iOS TrueTime libraries.
iOS: https://github.com/instacart/TrueTime.swift
Android: https://github.com/instacart/truetime-android
The plugin can be accessed using window.totalpave.date.
The app should call window.totalpave.date.init on launch.
The idea behind the plugin is to replace new Date/Date.now usage. You shouldn't be using either of these any more.
Instead you would use getTime, now, and getDate.
Setups the JavaScript side of the plugin to be used.
The native side of the plugin should be handled automatically; but, if for some reason something goes wrong, see reinit.
This function also sets up an event listener for resume. When the resume event fires, the plugin will automatically attempt to sync the time.
success, fail - cordova callbacks.
logger - Object to use to log things. Defaults to JavaScript's console object.
Any object will be allowed as long as it defines the function log.
timeSyncDelay - Number of milliseconds the plugin waits before attempting sync its time.
Runs the native initialize code. Native initialization code does nothing if it's already successfully initialized.
success, fail - cordova callbacks.
Changes the plugin's logger. This is a synchronous function.
logger - Object to use to log things. Will accept any object that defines the function log.
Attempts to sync the time. Can be called manually to immediately attempt a sync instead of waiting for the time sync delay.
success, fail - cordova callbacks
Gets the current time in milliseconds. This is a synchronous function.
Gets the current time as an JavaScript Date object. This is a synchronous function.
now calls getTime. So if you just want the time in milliseconds, getTime will be a little faster.
Alias for JavaScript's new Date. This is a synchronous function.
As mentioned above, the idea is to completely replace new Date/Date.now usage. getDate handles cases where you are passing arguments into new Date to get a specific time instead of current time.
FAQs
Cordova plugin to interface with TrueTime's Android and iOS NTP libaries.
We found that @totalpave/cordova-plugin-date 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.

Security News
Socket CEO Feross Aboukhadijeh shares lessons from scaling a developer security startup to 10,000+ organizations in this founder interview.

Research
Socket Threat Research maps a rare inside look at OtterCookie’s npm-Vercel-GitHub chain, adding 197 malicious packages and evidence of North Korean operators.

Research
Socket researchers identified a malicious Chrome extension that manipulates Raydium swaps to inject an undisclosed SOL transfer, quietly routing fees to an attacker wallet.