Skip to content

Loop the day and night outside every hour - #194

Merged
webdevcody merged 1 commit into
mainfrom
office/bolt-2f33
Sep 30, 2026
Merged

webdevcody merged 1 commit into
mainfrom
office/bolt-2f33

Conversation

@webdevcody

Copy link
Copy Markdown
Contributor

The sky outside used to follow the office machine's real clock, so a full day took a day. Now a whole day and night go by every hour.

How

  • skyTime() in src/shared/sun.ts speeds the office's clock up 24× for the sky. Midnight falls on the hour and noon at half past, with sunrise around a quarter past and sunset around a quarter to. The date stays today's, so a --city office still gets that place's day length for the season.
  • Sky keeps time by the office's clock (store.officeNow()), not each browser's own, so everyone sees the same sky.
  • ⚙️ → Outside shows the sky's time of day (e.g. 🌙 Clear · 11:36 PM outside), and its note says a day goes by every hour.
  • --help, docs/features.md, docs/how-it-works.md and docs/azure.md are updated. A city still sets the weather, the season's day length and the holiday calendar, but no longer the time of day.

Verified

  • npm run typecheck, npm test (414 + 3 new in tests/sun.test.ts) and npm run build all pass.
  • Headless Chrome (Metal): I pinned the office clock to each minute of one hour and read sky.daylight / lampsOn. It's dark until :16, the sun comes up at :17, it's full day from :18 to :46, the sun sets at :47, and it's night again by :49 through the next hour. Screenshots from the street at :00 (night), :18 (dawn), :30 (noon) and :50 (night) look right.

🤖 Generated with Claude Code

The sky used to follow the office machine's real clock, so a day took a
day. Now the office's clock is sped up 24× for the sky (skyTime in
shared/sun.ts): midnight on the hour, sunrise around a quarter past, noon
at half past, sunset around a quarter to. It stays on today's date, so a
--city office still gets that place's season's day length. Every browser
keeps time by the office's clock, so everyone sees the same sky, and
⚙️ shows the sky's time of day.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@webdevcody
webdevcody merged commit e2c89c8 into main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant