Permalink
Browse files

make it work with ruby18

  • Loading branch information...
1 parent 49d0a91 commit 538a5acaa7cf6d9f1399cf1f700ebc21e7fcb6c0 @mkristian committed Feb 19, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/ixtlan/babel/factory.rb
View
6 lib/ixtlan/babel/factory.rb
@@ -22,14 +22,14 @@ module Ixtlan
module Babel
class Factory
- NANOSECONDS_IN_DAY = Rational(1, 86400*10**9)
+ NANOSECONDS_IN_DAY = 86400*10**6
TIME_TO_S = Proc.new do |t|
t.strftime('%Y-%m-%dT%H:%M:%S.') + ("%06d" % t.usec) + t.strftime('%z')
end
DATE_TIME_TO_S = Proc.new do |dt|
- dt.strftime('%Y-%m-%dT%H:%M:%S.') + ("%06d" % (dt.sec_fraction / NANOSECONDS_IN_DAY / 1000)) + dt.strftime('%z')
+ dt.strftime('%Y-%m-%dT%H:%M:%S.') + ("%06d" % (dt.sec_fraction * NANOSECONDS_IN_DAY ) ) + dt.strftime('%z')
end
DEFAULT_MAP = {
@@ -89,4 +89,4 @@ def const_retrieve( const )
end
end
end
-end
+end

0 comments on commit 538a5ac

Please sign in to comment.