JournivJourniv
User Guide

Date & Time Handling

Understand how Journiv handles dates, times, and timezones for accurate journaling, streaks, and analytics.

Journiv is built to preserve your memories exactly as you experienced them—including the correct date, time, and timezone of every journal entry and mood log.

This page explains how Journiv handles time, how streaks and analytics work, and what happens when you travel or change your timezone.

Journiv's Time Philosophy

Your entries should always reflect the real moment you created them—no matter where you go or how your device settings change.

To make this possible, Journiv uses a UTC-first model with timezone preservation:

Journiv stores three pieces of information for every entry:

FieldMeaning
entry_datetime_utcThe exact moment you created the entry, in universal time (UTC)
entry_timezoneThe timezone you were in at that moment (e.g., "America/Los_Angeles")
entry_dateThe local calendar day the entry belongs to (derived from UTC + timezone)

This ensures:

  • Your entries always show the correct local time on every device
  • Day-based features (streaks, "On This Day," insights) remain accurate
  • Traveling or changing your timezone does not rewrite your history

How Journiv Stores Time

1. Precise Timestamp (UTC)

Every entry and mood log stores an ISO-8601 timestamp ending with "Z".

Example:

"entry_datetime_utc": "2025-10-29T21:43:00Z"

This is the absolute, unambiguous moment you created the entry.

2. Original Timezone

Journiv also stores the timezone you were in when you created the entry:

"entry_timezone": "America/Los_Angeles"

This ensures Journiv can reconstruct your real local time, even years later.

3. Local Calendar Day (entry_date)

From the UTC timestamp and your timezone, Journiv calculates the local day:

entry_date = entry_datetime_utc → converted to your timezone → .date()

This value is used for:

  • Streaks
  • Daily insights
  • "On This Day" memories
  • Activity graphs

How Journiv Displays Time in the App

The backend always sends timestamps in UTC.

The Journiv app (Flutter) converts them to your device's local timezone when displaying:

DateTime.parse(entry.entryDatetimeUtc).toLocal()

So even if you travel:

  • Your old entries show the original time you wrote them
  • New entries reflect your new timezone

How Streaks Work

A journaling streak means:

You wrote at least one entry on each local calendar day without missing a day.

To determine your streak:

  1. Journiv converts each entry's timestamp to its original local day
  2. It builds a list of all days you were active
  3. It counts backwards from today (in your timezone) until a day with no entry is found

Examples

  • If you write at 11:50 PM and again at 12:10 AM, those count as two different days
  • If you backdate an entry, Journiv applies it to the day you selected

Timezone Changes

If you travel:

  • Old entries still belong to the day you originally wrote them
  • New entries follow your new timezone
  • Your streak remains correct—it is always based on your actual local days, not UTC days

"On This Day" Memories

Journiv shows entries from past years that happened on the same local month and day.

For each entry:

local = entry_datetime_utc → converted to entry_timezone

if local.month == today.month AND local.day == today.day:
    include it

This guarantees:

  • A memory from "March 2nd" always appears as "March 2nd," even if you moved timezones since then.

Analytics & Insights

Journiv's insights use entry_date—the precomputed local day—to avoid timezone ambiguity and ensure fast, accurate calculations.

Examples:

  • Entries per day
  • Entries per week
  • Mood distributions
  • Heatmaps
  • Monthly overviews

All analytics use your original timezone at the time of writing, not your current one.

What Happens When You Travel or Change Timezone?

Old entries do NOT change

Your past stays intact.

New entries use your new timezone

Example:

  • You live in Berlin → write at 9 PM → stored with Europe/Berlin
  • You travel to New York → write at 9 PM → stored with America/New_York
  • Journiv will always show both as their correct local times

Streaks continue smoothly:

  • Each day uses the timezone that was correct at the time of writing

Import & Export Behavior

Journiv export files contain everything needed to reconstruct your entries exactly:

entry_datetime_utc
entry_timezone
entry_date
created_at
updated_at

During import:

  • UTC timestamps are restored exactly
  • Timezones are restored exactly
  • entry_date is recalculated to avoid DST drift
  • Nothing is converted to local timezone during import

This ensures:

  • No off-by-one errors
  • No date shifts
  • No broken streaks

Summary

  • Journiv always saves the exact moment you wrote something (UTC)
  • It also saves where you were (timezone)
  • It calculates the day it belongs to for streaks and analytics
  • Traveling never changes your past entries
  • Import/export preserves everything perfectly