Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Time.zone = 'London'
- def notification_times
- Enumerator.new do |y|
- [1, 2].each do | n|
- y << n.hours.from_now
- end
- end
- end
- puts notification_times.first # 2020-09-22 15:22:43 +0100
- puts notification_times.next # 2020-09-22 14:22:43 UTC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement