The program groups two UTC moments by the local date of a fixed offset and prints the result. You need to determine the exact stdout.
Requirements
- Assume the standard Ruby library is used with no external gems.
- The time zone offset is specified as a number of seconds and does not depend on the system time zone database.
- The answer must account for the exact order of lines, including the contents of arrays and hashes in
inspect.
- You need to provide the output of the entire program.
How to reproduce
Run the file:
ruby main.rb
Expected behavior
- The program should print a deterministic result consisting of a fixed number of lines.
- Grouping is performed by local date computed via
getlocal with the explicit offset -08:00.
- Then the program prints:
- an array of local dates in the order the events are processed;
- a hash
date => [identifiers] in key insertion order.