diff options
| author | Randy Morgan <[email protected]> | 2011-11-30 08:12:23 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2011-11-30 08:12:23 +0900 |
| commit | c98f7b9953cc9d949a9d674aa0f649140af1a20e (patch) | |
| tree | f787cc557ac4fdd59666eab9277d53b9ff1f677d | |
| parent | 65b75c23c1911caeeb9206924cd6a009e241fb03 (diff) | |
| download | caxlsx-c98f7b9953cc9d949a9d674aa0f649140af1a20e.tar.gz caxlsx-c98f7b9953cc9d949a9d674aa0f649140af1a20e.zip | |
patch excel time calculations
| -rw-r--r-- | lib/axlsx/workbook/worksheet/cell.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/axlsx/workbook/worksheet/cell.rb b/lib/axlsx/workbook/worksheet/cell.rb index a279316b..49b2eeb5 100644 --- a/lib/axlsx/workbook/worksheet/cell.rb +++ b/lib/axlsx/workbook/worksheet/cell.rb @@ -172,7 +172,7 @@ module Axlsx epoc1900 = -2209021200 #Time.local(1900, 1, 1) epoc1904 = -2082877200 #Time.local(1904, 1, 1) epoc = Workbook.date1904 ? epoc1904 : epoc1900 - ((v.localtime - epoc) /60.0/60.0/24.0).to_f + ((v.localtime.to_f - epoc) /60.0/60.0/24.0).to_f elsif @type == :float v.to_f elsif @type == :integer |
