Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

TrX's avatar
Level 2

Error displaying date

Hi, I have the laravel app developed and tested on wamp server and it worked fine, but now I have it on centOS server, everything works fine except that the date is showing as "invalid date" even though it's still the same code and database.

Link to the image: http://imgur.com/a/60bL7

Left window is app on centOS while right is running on wamp server. I don't know what is causing the problem and made sure it is not a database problem. Any help is appreciated, thanks.

0 likes
4 replies
bashy's avatar

Show some code to how you show the date...

1 like
TrX's avatar
Level 2

Sorry for the late reply, here's the view code:

<md-list-item class="md-3-line" ng-repeat="item in ctrl.rows">
            <span ng-style="{'background-color': item.color}" class="md-avatar initial-img">{{::item.Reference}}</span>
            <div class="md-list-item-text">
                <h3> {{::item.Sum * 1000 | number}}</h3>                
                <h4>Submitted At: <b>{{::item.REF_DATE | moment:'MMM, DD YYYY'}}</b> <small>ref. {{::item.K_n}}</small></h4>
                <h4>Payed At: <b>{{::item.decree.assignments[0].DateIH | moment:'MMM, DD YYYY'}}</b></h4>
            </div>
bashy's avatar

Ah that's Angular. Check any capitalisation in the fields or variables as I know moving from case-insensitive to a case-sensitive OS will have issues if you've got the capitalisation wrong.

TrX's avatar
Level 2

I changed the 'MMM, DD YYYY' to lowercase but still it shows invalid date, I still don't know why.

Please or to participate in this conversation.