You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
It would be nice to have a more precise EpochTime type. I'm a Ruby newbie, but this seems to work for me;
class EpochFloatTime < Float
def load(value)
case value
when ::Float, ::Integer
::Time.at(value)
else value
end
end
def dump(value)
case value
when ::Float, ::Integer, ::Time then value.to_f
when ::DateTime then value.to_time.to_f
end
end
end
The text was updated successfully, but these errors were encountered:
It would be nice to have a more precise EpochTime type. I'm a Ruby newbie, but this seems to work for me;
class EpochFloatTime < Float
The text was updated successfully, but these errors were encountered: