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

Incorrect date with time zone #209

Closed
donriga opened this issue Nov 22, 2017 · 3 comments
Closed

Incorrect date with time zone #209

donriga opened this issue Nov 22, 2017 · 3 comments
Assignees
Labels
need help Your support is required to solve this issue. needs investigation This will be tested / debugged or checked out.

Comments

@donriga
Copy link

donriga commented Nov 22, 2017

i have some problem, if getMail return date, this does not take time zone in message date

@barbushin barbushin added the need help Your support is required to solve this issue. label Jan 15, 2018
@adrium
Copy link

adrium commented Jun 8, 2018

The OP is correct. Consider the following header:

Date: Fri, 08 Jun 2018 09:57:36 +0200

The stored date in this case is:

$incomingMail->date === '2018-06-08 09:57:36'

The Timezone information is lost and invalid timestamps will be calculated.

The mail above is sent on 1528444656 but the calculation based on $incomingMail->date would have to assume UTC and that leads to the incorrect result of 1528451856.

@nettunodev
Copy link

nettunodev commented Jul 25, 2018

*** Comment deleted ***

@Sebbo94BY Sebbo94BY added the needs investigation This will be tested / debugged or checked out. label Apr 29, 2019
@Sebbo94BY Sebbo94BY self-assigned this Apr 29, 2019
@Sebbo94BY
Copy link
Collaborator

Fixed with PR #301.

Sebbo94BY added a commit that referenced this issue May 5, 2019
- Updated README
- Move phpunit to require-dev
- Add note about installing dev dependencies in README
- Replaced spaces with tabs
- Added PHPUnit tests for MIME decoding
- Updated formatting of PHPUnit function testParsedDateTimeWithEmptyHeaderDate()
- Issue #209: Function to parse datetime correctly RFC2822
- Issue #280: Added 'Sender' to headers and added additional if-conditions 
- Issue #115: getMail() method returns an object even for nonexistent mail ID
- Issue #273: Added connection check to example
- Issue #227: Added Failed-Recipients to IncomingMailHeader
- Issue #140, #246: Improved exception handling and added PHPUnit test
- Issue #140: Added PHPUnit test for testing ConnectionException
- Issue #140: Improved exception / error handling and improved / added PHPUnit tests
- Issue #154: Added ability to change the imap_search option from SE_UID to SE_FREE and added PHPUnit tests
- Issue #306: Added support for US-ASCII and added ability to disable serverEncoding for searchMailbox()
- Imported missing namespaces to avoid 'unknown class' error messages
- Issue #86: Simplified and improved one replace regex for attachment file names
- Issue #247: Improved grabbing of fromName, fromHost, senderName and senderHost
- Issue #39, #71, #229: Fixed body content gets incorrectly processed as attachments
- Issue #122, #150, #167: Added ability to skip processing of attachments to increase performance, when attachments are not required
- PR #284: Added missing PHPUnit tests
- Issue #122, #150, #167: Lazy load message text and attachments data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need help Your support is required to solve this issue. needs investigation This will be tested / debugged or checked out.
Projects
None yet
Development

No branches or pull requests

5 participants