Date localization not working on custom fields
Please confirm you have done the following before posting your bug report:
- [x] I have enabled debug mode
- [x] I have read checked the Common Issues page
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
- Create custom field in Settings > Custom Fields
- Set format to DATE
- Edit the asset and set the date field
Expected behavior Date field should show proper format as selected in Localization page. Purchase date is a standard field that works as expected.
Screenshots I can't figure out how to upload a screenshot, so I'll retype what I am seeing:
Last Annual Maintenance 2019-09-13 Purchase Date 08/08/2018
Is this a fresh install or an upgrade? Fresh Version of Snipe-IT you're running 4.9.2 build 4352 Version of PHP you're running 7.3.19 Version of MySQL/MariaDB you're running What OS and web server you're running Snipe-IT on Windows Server 2019
The screenshot (file) is simply dragged into the message body
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
Yes
On Sun, Aug 16, 2020 at 7:24 PM stale[bot] [email protected] wrote:
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/snipe/snipe-it/issues/8143#issuecomment-674591509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWUSXAIRVJYNGLWRTISQ3DSBBTCNANCNFSM4OAXWNJQ .
-- Sent from Gmail Mobile
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
I'll try to drop it here as I have this problem also:
Custom field name: Warranty ends
Chosen format on /admin/localization:
Display format on Asset page:

Custom Fields configuration view:

Issue still persists on v. 5.1.5 - build 6055 PHP: v. 7.4.3 OS: Ubuntu 20.04 MySQL: v. 8.0.25
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!
We are seeing this as well. Snipe-IT v5.4.1 - build 6746. Ubuntu 20.04, PHP 7.4.3, Apache 2.4.41, MariaDB 10.3.32.
We have "Ship Date/Warranty Start" and "Warranty End" custom fields with the format set to DATE. In Localization settings, "Time and Date Display" is set to mm/dd/yyyy.
Here's an example when viewing an asset:
Ship Date/Warranty Start 2019-08-11 Warranty End 2022-08-11 Purchase Date 08/08/2019
Looks like a common problem... Let me see what I can do.
In Snipe-IT v5.4.2 this bug has been fixed in some places but not others.
We have "Ship Date/Warranty Start" and "Warranty End" custom date fields. In Localization settings, we have "Time and Date Display" set to mm/dd/yyyy.
If you view an asset and look in the Info tab, the custom fields now show up correctly, as mm/dd/yyyy, as of Snipe-IT v5.4.2. See the screenshot below. In v5.4.1 and earlier, before the bug fix, they showed up incorrectly as yyyy-mm-dd.
If you go to the Dashboard and click the "total assets" button, and then search for assets, the custom fields still show up incorrectly as yyyy-mm-dd. See the screenshot below, where the two fields are shown next to a standard (non-custom) field, Purchase Date.
We are running Snipe-IT on Ubuntu 20.04, with PHP 7.4.3 and Apache 2.4.41.
This is still a problem in v6.0.2. I went to demo.snipeitapp.com and created a custom date field called TestCustomDateField, and entered a date for one laptop.
In Dashboard -> Assets button -> view all, the date shows up incorrectly in the table in yyyy-mm-dd format. It doesn't match the format set in "Time and Date Display" in the Localization settings. Here is a screenshot with the date circled:
If you click on the Asset Tag to go to the "View Asset" page, the format is correct. It matches the format set in the Localization settings. The update in v5.4.2 fixed the date format here, but not in the "All Assets" list as shown above.
Thanks for the heads up @dg-td. I overlooked it in my first attempt... but that's why the community is so important. I think now it's good to go. Thanks again!!