hako / blackboard-dl

📚💻 Downloads lectures and workshops automagically.
MIT License
8 stars 2 forks source link

Time.now deprecation warnings #8

Closed ocelotsloth closed 4 years ago

ocelotsloth commented 4 years ago

Compilation Warnings:

In src/cli.cr:91:16

 91 | now = Time.now
                 ^--
Warning: Deprecated Time.now. Use `Time.local` or `Time.utc` instead.

In src/cli.cr:100:44

 100 | puts "Checking new courses at #{Time.now.to_s("%T")}"
                                            ^--
Warning: Deprecated Time.now. Use `Time.local` or `Time.utc` instead.

In src/cli.cr:102:18

 102 | now = Time.now
                  ^--
Warning: Deprecated Time.now. Use `Time.local` or `Time.utc` instead.

A total of 4 warnings were found.

Everywhere Time.now is used will break at some point. Since Time.now defaults to local time my guess is that you will want that to be the new method used.

Reference

https://crystal-lang.org/api/0.32.1/Time.html#now(location:Location=Location.local):Time-class-method