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

Allow to specify date format in common/configuration.ini #518

Merged
merged 3 commits into from
Jan 8, 2019

Conversation

veggiematts
Copy link
Contributor

@veggiematts veggiematts commented Dec 17, 2018

Currently, Coral's date format is hardcoded in common/common_directory.php
This patch allows to specify the date format in common/configuration.ini, with a fallback to the default date format if nothing is specified.

[settings]
date_format = "%m/%d/%Y"

Currently, Coral's date format is hardcoded in common/common_directory.php
This patch allows to specify the date format in common/configuration.ini, with
a fallback to the default date format if nothing is specified.
@poacherone
Copy link
Collaborator

Tested, and this PR works the same as changing the code in common/common_directory.php. It mostly works as intended on most pages where dates are displayed, but I have opened two separate issues: Issue 520 and Issue 521.

Since the behavior is the same in changing the code directly (locally) or applying this PR, I would argue that this works as intended and that new PR:s should be created for the new issues.

Use strftime instead of strtotime to have common date format between php and mysql.
@veggiematts
Copy link
Contributor Author

In order to fix Issue #521, the date format is now like: "%m/%d/%Y"

@jeffnm
Copy link
Contributor

jeffnm commented Jan 8, 2019

Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is an enhancement (not a bug)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants