Skip to content

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 added the enhancement An improvement to an existing feature. label Sep 12, 2024
@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

Labels

enhancement An improvement to an existing feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants