How can I work out how many hours and minutes are between the current UTC time and the next time that it is 0021/12:21am in the UTC timezone?
For example, if the current UTC time is 2000/8:00pm, the answer would be 4 hours and 21 minutes. If the current UTC time is 0003/12:03am, the answer would be 0 开发者_开发问答hours and 18 minutes.
I'm using Ruby 1.9.2 and Rails 3.0.1
see
http://www.ruby-doc.org/core/classes/Time.src/M000358.html
http://www.ruby-doc.org/core/classes/Time.html#M000334
IF I understand this correctly the difference is represented as float
which in turn contains how many seconds...
精彩评论