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

Using gmdate() for displaying timestamps #240

Merged
merged 4 commits into from Jan 27, 2015
Merged

Using gmdate() for displaying timestamps #240

merged 4 commits into from Jan 27, 2015

Conversation

ihackcode
Copy link
Member

Since getUserTimestamp() modifies the $time to either the user's 'timezone_offset' or the site's 'Default_TZ' gmdate() should be used so the supplied $usertimestamp won't be affected by the timezone set by the locale.

@geekwright
Copy link
Contributor

Any chance you could update the unit tests to cover this, so we don't break it again in the future? Existing tests for this class are here:
https://github.com/XOOPS/XoopsCore/blob/master/UnitTestXoops/xoopsLib/Xoops/Locale/AbstractTest.php

The test_formatTimestamp() entry is just marked incomplete. A few simple cases would be better than nothing. And you seem to be very familiar with this method 😀

Thanks for the fix.

geekwright added a commit that referenced this pull request Jan 27, 2015
Using gmdate() for displaying timestamps
@geekwright geekwright merged commit b120dba into XOOPS:master Jan 27, 2015
@ihackcode ihackcode deleted the request branch January 28, 2015 03:08
@ihackcode
Copy link
Member Author

I'll try to get some tests in.

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

Successfully merging this pull request may close these issues.

None yet

2 participants