reused value of Time.now in a method
reused value of Time.now in a method

`Time.now` was being used to fetch the current time, twice in the
same line. This commit stores the time value in a variable and
reuses it instead of generating/fetching it for the second time.

Additionally, a guard clause in the same method is substituted by
an `if/else/end` block for clarity.

natefinch/discourse,natefinch/discourse