Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.
This repository was archived by the owner on Jan 2, 2019. It is now read-only.

PHPExcel_Shared_Date::PHPToExcel ignores timezones #38

@pwaring

Description

@pwaring

I've been having problems recently with converting Unix timestamps to Excel dates, whereby the date stored in Excel is one hour before what it should be (e.g. 01/06/2012 00:00 becomes 31/05/2012 23:00). On examining the code, I noticed that the PHPToExcel function in the PHPExcel_Shared_Date class sets the timezone to UTC before converting the date. My server is in BST (GMT+1) and the timezone is set to Europe/London everywhere else.

Is there a good reason why the function overrides the default timezone? I'm tempted to comment out the lines which do this because it's causing a major problem with the reports we generate, but I don't know whether that will affect other parts of PHPExcel.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions