Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format Date and Time objects stored in sample data #1291

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

tombruijn
Copy link
Member

Format the Date and Time objects in a human-friendly way. Previously, dates and times stored in sample data, like session data, would be shown as #<Date> and #<Time>.

They will now be show as #<Date: 2024-09-11> and #<Time: Time: 2024-09-12T13:14:15+02:00>.
(The time zone will be based on the setting in Ruby.)

The UTC offset is included in the Time object on purpose. Casting it to UTC will lose the timezone information.

@tombruijn tombruijn self-assigned this Sep 12, 2024
@tombruijn tombruijn force-pushed the format-date-and-time branch 3 times, most recently from 2e01b2d to ceb2f0e Compare September 12, 2024 07:47
Format the Date and Time objects in a human-friendly way. Previously,
dates and times stored in sample data, like session data, would be shown
as `#<Date>` and `#<Time>`.

They will now be show as `#<Date: 2024-09-11>` and
`#<Time: Time: 2024-09-12T13:14:15+02:00>`.
(The time zone will be based on the setting in Ruby.)

The UTC offset is included in the Time object on purpose. Casting it to
UTC will lose the timezone information.
@tombruijn tombruijn marked this pull request as ready for review September 12, 2024 08:04
@tombruijn tombruijn merged commit 8f51648 into main Sep 12, 2024
122 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants