Skip to content

Conversation

@kenjis
Copy link
Member

@kenjis kenjis commented Feb 12, 2024

Description
For #7177
See #8525

How it works

If you set the date/time formats in your DB config,

        'dateFormat'   => [
            'date'     => 'Y-m-d',
            'datetime' => 'Y-m-d H:i:s',
        ],

the formats will be used when a Model converts a Time instance to a string.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added enhancement PRs that improve existing functionalities 4.5 database Issues or pull requests that affect the database layer labels Feb 12, 2024
@kenjis kenjis force-pushed the feat-model-uses-db-dateFormat branch from 4dc1711 to d38f1f2 Compare February 13, 2024 01:15
@kenjis
Copy link
Member Author

kenjis commented Feb 13, 2024

Added docs.

@kenjis
Copy link
Member Author

kenjis commented Apr 8, 2024

This change is not sufficient. See codeigniter4/shield#1086 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database Issues or pull requests that affect the database layer enhancement PRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants