
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
expo-true-time
Advanced tools
expo-true-time is a library designed for reliable date-time management in React Native (Expo) projects,
capable of retrieving the real time from an NTP server and maintaining estimated UTC time without network connectivity.
It works on Android using SystemClock.elapsedRealtime and is only compatible with Android devices.
getNtpTime, getNtpTimeMS)getNtpTime, getEstimatedTimeUtc)getNtpTimeMS)getUpTime)# Using npm
npm install expo-true-time
# Or using yarn
yarn add expo-true-time
import { getNtpTime } from "expo-true-time";
const utcString = await getNtpTime();
console.log(utcString);
// "2025-08-04T10:35:10.583Z"
import { getNtpTimeMS, setBaseUtcTime } from "expo-true-time";
const ntpTimestamp = await getNtpTimeMS(); // timestamp (ms)
await setBaseUtcTime(ntpTimestamp); // set as base UTC time
⚠️ Important:
setBaseUtcTimeshould be provided a timestamp (ms), not an ISO string.
import { getEstimatedTimeUtc } from "expo-true-time";
const estimatedUtc = await getEstimatedTimeUtc();
console.log(estimatedUtc);
// "2025-08-04T10:35:10.583Z"
import { getUpTime } from "expo-true-time";
const upTimeMs = await getUpTime();
console.log(upTimeMs);
// E.g., 3600000 (1 hour in milliseconds)
⚡ Includes time while the device was awake and asleep.
⚡ Not affected by system clock changes.
⚡ Returns a Long (ms) value.
| Method | Description | Parameter | Return Type |
| ---------------------------- | ------------------------------------------------------------- | ------------ | ----------------------------------- | ----- |
| getNtpTime() | Retrieves UTC time from Google NTP servers (ISO string) | None | string "YYYY-MM-DDTHH:mm:ss.sssZ" |
| getNtpTimeMS() | Retrieves UTC time as timestamp (ms) from Google NTP servers | None | number (ms) |
| setBaseUtcTime(ms: number) | Sets a base UTC timestamp for calculating estimated UTC time | ms: number | void |
| getEstimatedTimeUtc() | Returns the estimated UTC time in ISO format | None | string | null |
| getUpTime() | Returns the device uptime since boot (includes awake + sleep) | None | number (ms) |
setBaseUtcTime.getEstimatedTimeUtc() can provide estimated UTC time without network.getNtpTimeMS() is stored via setBaseUtcTime, estimated time works offline.MIT © 2025 — Emre Dönmez & Contributors
FAQs
My new module
We found that expo-true-time demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.