P
Pablo Lorenzzoni
Hello ALL!
Just wanted to share... maybe someone have a better way to do this:
-----<beats.rb>-----
class Time
def bmt_hour
h = self.gmtime.hour + 1
return 0 if h == 24
return h
end
def beats
((self.bmt_hour * 60 * 60) + (self.min * 60) + self.sec) / 86.4
end
protected :bmt_hour
end
-----<EOF beats.rb>-----
require('beats.rb') and Time.now.beats returns the Internet Time in beats
[]s
Pablo
Just wanted to share... maybe someone have a better way to do this:
-----<beats.rb>-----
class Time
def bmt_hour
h = self.gmtime.hour + 1
return 0 if h == 24
return h
end
def beats
((self.bmt_hour * 60 * 60) + (self.min * 60) + self.sec) / 86.4
end
protected :bmt_hour
end
-----<EOF beats.rb>-----
require('beats.rb') and Time.now.beats returns the Internet Time in beats
[]s
Pablo