Skip to content

Conversation

@bdach
Copy link
Contributor

@bdach bdach commented Nov 10, 2025

Compare web-10.

This is more important to get right than I originally thought because this isn't just a value for show, it's actually used to validate timestamps in mod posts apparently.

Note that Math.Ceiling() is chosen intentionally rather than Math.Floor(). The reason for this is that web-10 flooring is technically incorrect if we are to assume editor timestamps are validated against total_length because you could have a timestamp that's just a couple of milliseconds past the floored-time-of-last-object.

Reported in https://discord.com/channels/90072389919997952/1259818301517725707/1436493355520626690 / https://osu.ppy.sh/beatmapsets/2455343/discussion/-/generalAll#/5254737.

Compare
https://github.com/peppy/osu-web-10/blob/18ae5b4f9dc6e9637d69e47460e6affb5840d3ef/www/web/osu-osz2-bmsubmit-upload.php#L151.

Note that `Math.Ceiling()` is chosen intentionally rather than
`Math.Floor()`. The reason for this is that web-10 flooring is
technically incorrect if we are to assume editor timestamps are
validated against `total_length` because you could have a timestamp
that's just a couple of milliseconds past the
floored-time-of-last-object.

Reported in
https://discord.com/channels/90072389919997952/1259818301517725707/1436493355520626690.
@bdach bdach requested a review from peppy November 10, 2025 08:44
@bdach bdach self-assigned this Nov 10, 2025
@bdach bdach moved this to Pending Review in @peppy's untitled project Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Pending Review

Development

Successfully merging this pull request may close these issues.

2 participants