Hi Garmin Dev Team,
I would like to report a critical limitation regarding timestamp handling in Connect IQ, which may soon affect many apps and users:
Issue:
-
All timestamp and time-related APIs (Moment, value(), etc.) currently use
Lang.Number
(signed 32-bit integer). -
The maximum value is 2,147,483,647, which corresponds to January 19, 2038 (Y2038 problem).
-
Already today, many valid use cases exist for working with expiration dates, licenses, health events, or logs that extend beyond 2038.
-
Any timestamp calculation or storage above this value cannot be safely represented or compared using
Number
—developers must useLang.Long
and workarounds.
Why this matters:
-
Business cases (subscriptions, licensing, insurance, medical apps) may need to set or compare dates beyond 2038.
-
Automated testing or user data with future dates can already trigger bugs.
-
This is an industry-wide issue that will affect all Connect IQ apps using time APIs sooner than expected.
Expected Solution:
-
The Connect IQ APIs (e.g., Moment.value(), Time-related methods, persistent storage) should support or return
Lang.Long
for all timestamps. -
The documentation and API contracts should clarify this for future-proof apps.
Request:
-
Please consider updating the SDK to natively support 64-bit timestamps.
-
At the very least, please document best practices for safe Long handling of all timestamps and note the Number limitation prominently in the docs.
Thank you for your attention!
A concerned Connect IQ developer