Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Time vs Zulu for File Create Date #162

Closed
snethej opened this issue May 10, 2016 · 4 comments
Closed

Local Time vs Zulu for File Create Date #162

snethej opened this issue May 10, 2016 · 4 comments
Assignees

Comments

@snethej
Copy link

snethej commented May 10, 2016

When I create a file, the date stored as the file created date (as seen in the peoperties) is 5 hours behind my current time, and my current time is 5 hours behind UTC.

For example, I just created a file. My local time is 8:01 am (CDT). UTC is 13:01 (1:00 pm). The timestamp of the created date of the file is 3:01 am. This would be the time in Hawaii.

Looking at the core.xml file in the doc props archive of the xlsx file, I see the following:

<dcterms:created xsi:type="dcterms:W3CDTF">2016-05-10T08:01:46Z</dcterms:created>
<dcterms:modified xsi:type="dcterms:W3CDTF">2016-05-10T08:01:46Z</dcterms:modified>

It appears the the local server time is being written as Zulu time, which is pushing the time back in the wrong direction.

@jmcnamara
Copy link
Owner

Thanks for the report. That's a bug.

You can workaround it for now by adding this to your program:

    $workbook->set_properties(created => [ gmtime() ]);

I'll fix it soon.

@jmcnamara jmcnamara self-assigned this May 10, 2016
jmcnamara added a commit that referenced this issue May 10, 2016
@jmcnamara
Copy link
Owner

I've pushed a fix to the master branch for this issue if you would like to try it.

@snethej
Copy link
Author

snethej commented May 10, 2016

I will try and get to it soon. Thanks for the support!

@jmcnamara
Copy link
Owner

Fixed in Excel::Writer::XLSX version 0.90.

Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants