Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove representation of floating time from
Time
Floating time should not be represented as an instance of `Time` to avoid undefined operations through type safety (see crystal-lang#5332). This commit removes all implementation details regarding floating time, including the special location `Location::UNSPECIFIED`. Breaking changes: * Calls to `Time.new` and `Time.now` are now in the local time zone by default. * `Time.parse`, `Time::Format.new` and `Time::Format.parse` don't specify a default location. If none is included in the time format and no default argument is provided, the parse method wil raise an exception because there is no way to know how such a value should be represented as an instance of `Time`. Applications expecting time values without time zone should provide default location to apply in such a case.
- Loading branch information