Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Allow Partial URL Parameters#61

Merged
sarcasticadmin merged 1 commit intomasterfrom
202602071720
Feb 10, 2026
Merged

Allow Partial URL Parameters#61
sarcasticadmin merged 1 commit intomasterfrom
202602071720

Conversation

@kylerisse
Copy link
Copy Markdown
Owner

Fixes #55

Description of PR

Partial date parameters supplied in the URL will now merge with actual values from now to make development more enjoyable. Because time shifting is mainly for development there is no attempt to bound integer values and they simply pass them straight through to Date library for better or worse. Non-numbers are ignored. Thank you to @carlynlee for working on this.

Previous Behavior

Every URL parameter was required to create a time shifted customer date. (year, month, day, hour, minute)

New Behavior

Developer can choose to omit certain values and the result with be what is expected. For example http://localhost/?month=3 would only change the month but keep the current year, day, hour, and minute. This works for any combination of values.

Tests

  • mainly UI testing

Co-authored-by: kylerisse <kylerisse@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@sarcasticadmin sarcasticadmin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds fine and runs great:

$ ./result/bin/go-signs
2026/02/10 21:23:34 Updating Schedule from https://www.socallinuxexpo.org/scale/23x/signs
2026/02/10 21:23:34 Listening on :2017
2026/02/10 21:23:36 Invalid DrupalNode {PostgreSQL Hands-On Training Day    Ryan Booz, Devrim Gunduz, Elizabeth Christensen Pos
tgreSQL A full PostgreSQL training day adjacent to the SCaLE LA event. 6 hours total, running for a full day as a single track
(with 90 minute lunch break). Attendees can attend some or all of the event. Aimed both at new Postgres users and those migrati
ng from other db systems.&nbsp;
} (error: invalid StartTime)
2026/02/10 21:23:36 Schedule updated with 272 sessions, hash: df55094754d8b9a84096b2bb9e8793840f639bc82535fd4d06a24545c9e492af
[GIN] 2026/02/10 - 21:23:59 | 200 |    2.245719ms |       127.0.0.1 | GET      "/?year=2025&month=3&day=8&hour=1&minute=53"
[GIN] 2026/02/10 - 21:23:59 | 200 |     201.167µs |       127.0.0.1 | GET      "/assets/index-C11fsQvG.css"
[GIN] 2026/02/10 - 21:23:59 | 200 |       995.8µs |       127.0.0.1 | GET      "/assets/index-DjfHA5we.js"
[GIN] 2026/02/10 - 21:23:59 | 200 |     270.368µs |       127.0.0.1 | GET      "/assets/wifi-DhUPXLyX.png"
[GIN] 2026/02/10 - 21:23:59 | 200 |     835.329µs |       127.0.0.1 | GET      "/assets/logo-B5b-HI3O.png"
[GIN] 2026/02/10 - 21:23:59 | 200 |     153.819µs |       127.0.0.1 | GET      "/sponsors/all"
[GIN] 2026/02/10 - 21:23:59 | 200 |    1.913815ms |       127.0.0.1 | GET      "/schedule"
[GIN] 2026/02/10 - 21:23:59 | 404 |      46.407µs |       127.0.0.1 | GET      "/favicon.ico"
[GIN] 2026/02/10 - 21:23:59 | 200 |     183.715µs |       127.0.0.1 | GET      "/assets/noc-penguin-D40Kt-Pp.png"
[GIN] 2026/02/10 - 21:23:59 | 200 |     108.804µs |       127.0.0.1 | GET      "/sponsors/images/microsoft.png"
...

Partial time shifting works great too: http://127.0.0.1:2017/?year=2026&month=3&day=7 (ignore my UTC timezone):

Image

@sarcasticadmin sarcasticadmin merged commit 8d7ad53 into master Feb 10, 2026
1 check passed
@sarcasticadmin sarcasticadmin deleted the 202602071720 branch February 10, 2026 21:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Partial URL Parameters

3 participants