summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2011-11-29 20:15:16 +0900
committerRandy Morgan <[email protected]>2011-11-29 20:15:16 +0900
commit081b7c0146dc11b7a6db305c01a1d03f4bd0c2e8 (patch)
treecf2a0ec4a386d4eccbbe9cf409e0cfde91654845 /lib
parent3cd46c72882d3bb42bc46b67dbc12cbd805d0c4f (diff)
downloadcaxlsx-081b7c0146dc11b7a6db305c01a1d03f4bd0c2e8.tar.gz
caxlsx-081b7c0146dc11b7a6db305c01a1d03f4bd0c2e8.zip
Travis still does not like my Time.local(1900,1,1,0,0,0,0) format. Dropping down to year, month and day only.
Diffstat (limited to 'lib')
-rw-r--r--lib/axlsx/workbook/worksheet/cell.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb
index 3babefa2..42f3605e 100644
--- a/lib/axlsx/workbook/worksheet/cell.rb
+++ b/lib/axlsx/workbook/worksheet/cell.rb
@@ -169,7 +169,7 @@ module Axlsx
def cast_value(v)
if (@type == :time && v.is_a?(Time)) || (@type == :time && v.respond_to?(:to_time))
v = v.respond_to?(:to_time) ? v.to_time : v
- epoc = Workbook.date1904 ? Time.local(1904,1,1,0,0,0,0) : Time.local(1900,1,1,0,0,0,0)
+ epoc = Workbook.date1904 ? Time.local(1904,1,1) : Time.local(1900,1,1)
((v.localtime - epoc) /60.0/60.0/24.0).to_f
elsif @type == :float
v.to_f