Created
May 23, 2025 07:48
-
-
Save katafrakt/76ccec88a4af5c96b89d32007473756f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start_time = ~U[2025-05-23T09:21:17Z] | |
s1 = session_fixture(started_at: start_time) | |
s2 = session_fixture(started_at: DateTime.add(start_time, 60)) | |
s3 = session_fixture(started_at: DateTime.add(start_time, 160)) | |
s4 = | |
session_fixture( | |
started_at: DateTime.add(start_time, 245), | |
finished_at: DateTime.add(start_time, 305) | |
) | |
# after | |
start_time = ~U[2025-05-23T09:21:17Z] | |
add_time = fn seconds -> DateTime.add(start_time, seconds) end | |
s1 = session_fixture(started_at: start_time) | |
s2 = session_fixture(started_at: add_time.(60)) | |
s3 = session_fixture(started_at: add_time.(160)) | |
s4 = session_fixture(started_at: add_time.(245), finished_at: add_time.(305)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment