Migrating Bubble Dates and Time Zones Without Shifting Customer Data
A rebuild can preserve every record and still move a booking to the wrong hour, change a birthday, or put an order in yesterday’s report. The mistake is often not a failed import. It is treating every field called “date” as the same kind of information.
When moving a Bubble app to code, preserve what each date means before choosing its database type. This guide gives founders and technical leads a practical acceptance method for timestamps, calendar dates and business-day boundaries. It does not replace a full data migration plan or a scheduler-transfer runbook.
Start with meaning, not the displayed date
Bubble’s date-and-time documentation explains that a native date value includes a time and is stored as milliseconds since the Unix epoch. Display and input can depend on the user’s time zone or a configured override; server behavior can differ when user context is unavailable. A screen showing only “October 22” therefore does not prove the underlying value is a date without a time.
Inspect the field’s writers and readers together: the picker, workflow, imported spreadsheet, API, report and export. Note any plugin or custom formatting separately. A native Bubble field’s behavior does not establish how a third-party picker handles its input.
Build one short record for each business-important field: source field and environment; intended meaning; raw example; input zone; display zone; destination representation; conversion rule; unresolved exceptions; and the person approving the result. Include the export format and extraction context, not just a screenshot.
Separate three different kinds of date
An instant: something happened at one moment
Payment received, account created and a confirmed meeting start usually identify an instant. Preserve the same point on the timeline, even when two viewers see different clock times. Compare normalized instants at an agreed precision, rather than comparing formatted labels.
For example, a fictional event recorded as 2026-01-15T15:00:00Z and 2026-01-15T10:00:00-05:00 describes the same instant. If the replacement reads the second value as 10:00 UTC, the import has changed the event by five hours. Keep a fixture like this in the migration tests.
A calendar date: the day itself is the value
A birthday, service date or accounting period label may need to stay January 15 everywhere. It is not automatically an event at midnight UTC. If Bubble represented that value using a timestamp, recover the intended calendar components using the documented original rule before storing a date-only destination value.
Suppose the documented source rule stored a service date as midnight in America/New_York. For the fictional value 2026-01-15T05:00:00Z, the intended date is January 15. A Los Angeles viewer sees January 14 at 21:00, but that viewer’s display must not determine the migrated date.
Do not infer that rule from today’s viewer zone. An old record may have been created by a different user, imported in another locale, or written by a backend workflow. If the original context is missing, flag the affected records for a business decision. A migration cannot reliably reconstruct information the source never retained.
A local appointment or rule: clock time plus place
“The clinic opens at 09:00 in America/New_York” is different from “open every 24 hours after this timestamp.” Preserve the local time, named zone and relevant calendar rule when that is the product’s intent. A fixed UTC offset alone does not describe future daylight-saving changes.
The IANA Time Zone Database tracks changes to local-time rules. Use supported zone identifiers and maintained time-zone data rather than a hand-written offset table. For future appointments, agree whether a later legal time-zone change should preserve the promised local hour or the originally resolved instant. Record that policy; do not let a library update silently decide it.
Make the export-to-database conversion explicit
Before a full import, capture representative raw values through the actual extraction route you will use. Identify whether each value is an epoch count, a timestamp with an offset, a local date-time without one, or a formatted date. Specify units, precision, locale and null handling in the mapping.
A millisecond count interpreted as seconds is not a small rounding error. Neither is interpreting 03/04/2026 using the wrong month/day order. Reject ambiguous input unless the agreed source contract resolves it. Preserve the untouched source value in controlled migration evidence so a conversion can be explained and safely corrected.
PostgreSQL’s date/time types illustrate why destination names matter: date stores a calendar date, while timestamp with time zone represents an instant and does not retain the originally supplied zone name. Store a named business zone separately when the application needs it. A plain timestamp is without time zone; assigning a zone later is a business interpretation, not merely formatting.
Avoid a blanket rule to put every field in UTC. UTC is useful for instants and system logs, but a date-only value and a recurring local-time rule need their own models. Decide the semantics first, then choose the schema and application library.
Test the browser as well as the database
Correct storage does not guarantee correct screens. An API response can preserve a value while a browser parser changes its interpretation. MDN documents that JavaScript’s standard date-only string form is interpreted as UTC, while a date-time string without an offset is interpreted as local time. Do not rely on a generic Date conversion to carry a date-only business value through the UI.
Exercise the complete round trip: read an existing value, display it, open its editor, save without changes, reload, export and compare. Repeat with different browser zones and locales. A no-op edit must not change an instant or shift a calendar date. Test an actual edit too; a UI can display correctly but submit the wrong representation.
Make the chosen zone visible wherever users could reasonably misunderstand it. A booking confirmation, calendar and downloadable report should agree about whether they use the viewer’s zone, the appointment’s location or the organization’s reporting zone.
Define “today” before comparing reports
A report for one business day needs an explicit zone and boundary rule. For an instant-based event stream, calculate the start of the selected local day and the start of the next local day, convert those boundaries to instants, and use a start-inclusive, end-exclusive range. This avoids inventing a final “23:59:59.999” that depends on storage precision.
Do not assume the next boundary is always 24 hours after the first. PostgreSQL’s date/time arithmetic documentation describes the distinction between calendar-day arithmetic and elapsed hours across daylight-saving changes. Resolve each local boundary according to the applicable zone and agreed policy, including unusual transitions where local midnight itself is affected.
Compare report membership using mapped record IDs, not only totals. Two reports can show the same count while assigning different orders to the day. Include entries just before, exactly on and just after each boundary. Keep authorization and tenant filters identical so a time comparison does not accidentally broaden access.
A small acceptance pack that exposes real mistakes
Use fictional fixtures and isolated test environments, not copied customer birthdays or live notifications. Here is an illustrative pack for a booking product; adapt the expected outcomes to your own approved rules.
- Instant fixture: import 2026-01-15T15:00:00Z. It remains that instant after viewing in two zones and saving without edits. Equivalent offset-form input resolves to the same result.
- Date-only fixture: a service date of 2026-01-15 stays January 15 in every supported viewer zone after opening and saving its editor without changes, API retrieval and CSV export. Then change it to January 16 and verify that the intended new date survives the same round trip.
- Ambiguous-input fixture: 03/04/2026 follows the declared source locale or is held as an exception. The importer never guesses from the server locale.
- Transition fixture: choose a skipped and a repeated local time from the zones the product supports. Verify the agreed reject, shift or explicit-selection behavior. For a repeated hour, evidence must identify which occurrence was selected.
- Reporting fixture: records on both sides of a local-day boundary appear in exactly the intended report. The expected ID set survives import and the next sync.
- Missing-value fixture: null, missing and invalid values remain distinguishable where the product requires it. None silently becomes the Unix epoch or today’s date.
For every failure, record the source ID, sanitized source value, expected meaning, observed result and owner. Check the affected population before fixing it. A five-hour offset in one fixture may indicate a whole writer path was interpreted incorrectly.
Approve corrections separately from preservation
Sometimes the old app already handled dates incorrectly. Decide whether the migration should preserve historical behavior, repair confirmed errors, or preserve old records while changing future entry. Those are different scopes with different customer consequences.
Keep the original evidence and a versioned transformation rule. Rehearse correction and rerun behavior on a copy, including values changed since the first extraction. The broader Bubble data migration checklist covers identity, relationships and final-sync reconciliation; add the date acceptance pack to that evidence rather than treating a successful import as approval.
Date semantics also feed reminders and recurring work. Use the scheduled-workflow migration guide for pending-job ownership, retries and cancellation. This checklist establishes what the time means; it does not prove an external action will happen once or at an exact second.
Bring one difficult date field to the migration review
If the application works well and there is no business reason to rebuild it, date handling alone is not an argument for leaving Bubble. If a migration is already justified, put the field map, ambiguous records and acceptance fixtures into scope before implementation.
Bubble to Code’s published process includes mapping application behavior, validating a replacement and planning cutover. Its team page describes Bubble developers and software engineers working together. Book a migration review with one date field, the screens and reports that use it, and a sanitized example that must not change. The useful outcome is an agreed interpretation and test, not a promise that every timestamp can be copied unchanged.
Frequently asked questions
- What should block migration sign-off?
- An unresolved date-only interpretation, a failed no-op edit or a mismatched report ID set should block approval for the affected field. Record the exception and its owner instead of treating a successful import as proof that the data means the same thing.
- Can I recover the original time zone from a timestamp?
- Not in general. The same instant can be displayed in many zones. Use retained business context, explicit zone fields and verified writer behavior. If those are absent, document uncertainty rather than manufacturing a zone.
- Is matching the old screen enough?
- No. Verify raw meaning, no-op and edited round trips, other viewer zones, report boundaries and exports. A screenshot from one account can conceal a conversion error that only affects another zone.
Sources
- 01Time, dates and time zones · Bubble Docs
- 02IANA Time Zone Database · IANA
- 03Date/time types · PostgreSQL Docs
- 04Date/time functions and operators · PostgreSQL Docs
- 05JavaScript Date reference · MDN Web Docs
Keep reading
Bubble to Code is an independent service. Not affiliated with, endorsed by, or sponsored by Bubble Group, Inc.
