External Feed Block Incorrect Timestamp

Bug #1437088 reported by Bernard Neary
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
New
Undecided
Unassigned

Bug Description

Version: 15.04rc1

On a new page add an External feed. Timestamp displayed on Mahara does not match timestamp displayed on RSS feed page.
Seems to be incorrect by 13 hours - I can't find a user timezone setting ; I'm in GMT.

Examples:
Timestamp for item 1 should be 27 March 2015 00:03. Mahara displays 27 March 2015, 1:03 PM
Timestamp for item 2 should be 26 March 2015 23:59. Mahara displays 27 March 2015, 12:59 PM

Revision history for this message
Bernard Neary (bneary) wrote :
Revision history for this message
Robert Lyon (robertl-9) wrote :

Hi Bernard,

The external feed extracts the date from the feed using getDate() in htdocs/lib/pear/XML/Feed/Parser/Type.php
in Mahara, and that in turn uses the strtotime() function in PHP.

Part of the documentation for that function says: "Each parameter of this function uses the default time zone unless a time zone is specified in that parameter."

So the things we'll need to know to test this is
1) The URL of the feed used
2) What timezone is your PHP/Database operating in?

Cheers

Robert

Changed in mahara:
status: New → Incomplete
Revision history for this message
Bernard Neary (bneary) wrote :
Aaron Wells (u-aaronw)
Changed in mahara:
status: Incomplete → Triaged
status: Triaged → New
Revision history for this message
Aaron Wells (u-aaronw) wrote :

Hi Bernard,

The master.dev.mahara.org site is set to New Zealand time. So what you're seeing is that the server is translating the times from your RSS file to NZDT, which is GMT+13.

Mahara does not currently have a feature to support user time zones. There's a (longstanding) wishlist bug for that, but as our major clients are primarily in one time zone each, we've never been able to organize funding to develop this feature.

Cheers,
Aaron

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.