Sanniv Khare 6 min read

expo-notifications 58.1.11: iOS Notification.date is now in ms

expo-notifications 58.1.11: iOS Notification.date is now in ms

If your React Native app multiplies Notification.date by 1000 on iOS, that line breaks with expo-notifications 58.1.11. The package, published on 2 December 2026 with Expo SDK 58.1.1, now returns the iOS value in milliseconds since the Unix epoch, the same unit Android has always used. Before, iOS returned seconds. The old cross-platform fix (date * 1000 on iOS) now produces a date in the year 58,892, and nothing fails at build time. Search your code for that multiplication, delete it or switch to the helper below, and check every screen that sorts or prints notification times.

This post is a source diff of the npm packages expo-notifications 58.1.10 and 58.1.11, plus a grep and a helper we ran against a small fixture app on Node 22.

Why we did this: our React Native banking and TV apps keep notification history screens, and the iOS seconds versus Android milliseconds split is exactly the kind of difference that gets patched once in shared code and then forgotten.

Why a patch release reaches your app without you asking

Expo SDK 58.1.0 pinned "expo-notifications": "~58.1.10" in its bundledNativeModules.json. Expo SDK 58.1.1 pins "~58.1.11". A tilde range accepts any patch, so an app that declares ~58.1.10 gets 58.1.11 on the next fresh npm install, a lockfile refresh or npx expo install --fix. You do not have to bump anything on purpose for the new unit to arrive.

The changelog says it plainly under 58.1.11:

[iOS] Breaking change: Notification.date is now in milliseconds since the Unix epoch, as on Android. It was in seconds. If your app multiplies this value by 1000 on iOS, remove that conversion. (#54663)

The native line that changed

We ran npm pack expo-notifications@58.1.10 and @58.1.11 and diffed the packages. On iOS the whole change is one line in ios/ExpoNotifications/Notifications/NotificationRecords.swift, inside NotificationRecord(from:), the record that every Notification object passed to JavaScript is built from:

Swift diff of NotificationRecords.swift between expo-notifications 58.1.10 and 58.1.11

The NotificationRecord initialiser before and after; date is a Double field in both.

// 58.1.11
public init(from notification: UNNotification) {
  self.request = NotificationRequestRecord(from: notification.request)
  self.date = notification.date.timeIntervalSince1970 * 1000
}

Android did not change. NotificationSerializer.java writes notification.getOriginDate().getTime() (milliseconds) for local notifications and extras.getLong("google.sent_time") (also milliseconds) for FCM messages, in both versions. iOS now matches it.

Two details from the same diff are worth knowing:

  • getNextTriggerDateAsync was already in milliseconds on iOS (SchedulerModule.swift multiplies by 1000 in both versions). Only Notification.date changed.
  • The TypeScript type is still date: number. 58.1.11 adds a doc comment, “The time of the notification, in milliseconds since the Unix epoch”, so the type checker cannot catch the change for you.

Where Notification.date reaches your code

Every API that hands you a Notification object carries the new value on iOS:

  • addNotificationReceivedListener(listener): the notification itself.
  • addNotificationResponseReceivedListener(listener): response.notification.date.
  • getLastNotificationResponseAsync(), getLastNotificationResponse() and the useLastNotificationResponse() hook.
  • getPresentedNotificationsAsync(): an array of notifications, often sorted by date.

Sorting by date alone still works on a single device, because every value on that device now has the same unit. The breakage is anywhere the number is turned into a time: new Date(...), a date library, a “2 minutes ago” label, or a value you send to your backend and compare with server timestamps.

Find the old workaround

This is the pattern we searched for. It catches the platform-branch fix and the inline one:

grep -rnE "date\s*\*\s*1000|new Date\([^)]*notification[^)]*\.date" src

On a fixture app with three files (two with the old fix, one that only sorts), it found exactly the two that convert:

Terminal output of the grep and of the helper check run on Node 22

Real output from the fixture app: the grep hits, then the helper on all three inputs, then what the old * 1000 gives on 58.1.11.

If your code wraps the value first (const t = n.date and later t * 1000), the grep will miss it. Search for .date near Notifications imports as a second pass.

A helper that works on both versions

Deleting the * 1000 is the right fix once every build ships 58.1.11. During the move, or in a library that supports several SDK versions, decide by magnitude instead:

// notificationTime.ts
// Notification.date from expo-notifications, as a Date, on any version.
// Before 58.1.11 on iOS: seconds. 58.1.11+ on iOS, and Android: ms.
const MS_THRESHOLD = 1e11; // 1e11 s is year 5138; 1e11 ms is 1973

export function notificationTime(date: number): Date {
  return new Date(date < MS_THRESHOLD ? date * 1000 : date);
}

No real notification has a timestamp before 1973, and no seconds value reaches 1e11 for another three thousand years, so the two ranges never overlap. We checked it on Node 22.23 with the same instant in three forms (1796306700.512 seconds from 58.1.10 on iOS, 1796306700512 milliseconds from 58.1.11 and from Android): all three print 2026-12-03T14:05:00.512Z. The old fix applied to the new value prints +058892-09-09T19:28:32.000Z, a valid but absurd date, which is why no crash warns you.

Call it at the edge, where the notification enters your app:

import * as Notifications from "expo-notifications";
import { notificationTime } from "./notificationTime";

Notifications.addNotificationReceivedListener((n) => {
  inbox.add({ id: n.request.identifier, at: notificationTime(n.date) });
});

The other change in 58.1.11: turning off server registration

The same release fixes setAutoServerRegistrationEnabledAsync(false), per #54431. The diff shows both sides:

  • iOS: setRegistrationInfoAsync now takes String?. With nil it deletes the Keychain item through a new deleteItemWithQuery (SecItemDelete, treating errSecItemNotFound as success). In 58.1.10 the parameter was a non-optional String, so disabling registration could not pass null through.
  • Android: RegistrationInfo.set(null) used to call File.delete() and ignore the result. It now calls Os.remove() and rethrows any ErrnoException other than ENOENT, so the promise rejects when the stored info cannot be deleted. If you call this on logout, add a catch.

Also in SDK 58.1.1: Compose lists on Android

expo-modules-core 58.2.1, published the same day, fixes LazyColumn and LazyRow content vanishing before a navigation pop transition ends (#54361). The diff touches ExpoComposeView.kt, which gains an onComposableChildrenChanged() hook that is skipped while a removed child is still animating out. If you saw blank lists during back navigation with Expo UI’s Compose components, this is the fix.

What to check in your app

  1. Run npm ls expo-notifications and note whether you resolve 58.1.10 or 58.1.11.
  2. Run the grep above and remove or replace every iOS * 1000 on Notification.date.
  3. Look at anything you send to a server: a backend that stored iOS seconds will now receive milliseconds from upgraded clients. Normalise on one side and say which in your API docs.
  4. Check catch handling around setAutoServerRegistrationEnabledAsync(false) on Android.
  5. On a real iPhone, trigger a local notification and compare the time your inbox shows with the clock.

We covered other native diffs of this kind in react-native-purchases 12: the native diff and the SwiftPM move, and the Expo notifications API is documented in the Expo Notifications reference.

Made by the team behind this post

Apps from our studio

  • Goes with this post

    Cardigami

    Pop-up greeting cards that rise out of the fold on iPhone Duo.

    iPhone · App Store

    Get
  • Nix

    The Mac uninstaller that finds what the Trash leaves behind: caches, logs, derived data and saved states.

    macOS

    Get
  • BMDB.fun

    Your Bollywood world at a glance, with links straight to the OTT app that streams each film.

    Android TV · Web · Mobile

    Get
  • OneClick QuitAll

    Quit every running app in one click. See memory and CPU first.

    macOS · Mac App Store

    Get

Need this built? Let’s talk.

We build and run apps for Mac, TV, mobile and the web, and write about what we learn.