Wrong date format

Asked

Viewed 174 times

0

I have a problem and I have no idea how to solve, it is the following: The date on a system I am modifying does not show in View correctly.

Is this way:

0404/0606/2018181818 9:56:19 AM

Where should I show:

04/06/2018 9:56:19 AM

I’ve noticed that codeigniter has a helper that formats dates, but I can’t identify the error and I don’t know if the error comes from there, because I couldn’t identify where is the "constructor" of the dates in the code being studied (I think it’s not even the case, if I put the excerpt)but since all dates are shown in the same way, I imagine it must be starting from some common point.

example image (so it is at the moment, at all sites of the system):

Data errada.

Any idea?

  • 1

    post your code. But possibly you would only need to put something like d-m-yy and is using dd-mm-yyyy

  • 1

    Your comment was very enlightening. In fact the format is being managed by the application itself in a menu of its own, I changed the settings to what was suggested and worked perfectly. Thank you very much :D

  • still suggest you put the part of the code that was incorrect in the question; if it is the case, add also an answer with the solution to be marked as correct so that the question is not open.

  • on the question I believe I have no way because of the reputation :s but I will add an answer with the solution.

  • can yes, you edit your own question. But if you can’t, you put error and solution in the answer ;)

  • turned out I could not, to getting the way yet xD already published the solution, thank you very much for the help :)

  • blz. Then mark it as correct and it’s all right ;)

Show 2 more comments

1 answer

1


Solved

As noted in the comments the problem was not in lines of code itself. Seeing the date_helper.php and taking into account what was suggested in the comments of the question, I saw that the system was already fully prepared for treatment of date and time in all formats and in a very systematic way.

It turned out that the system has a settings section where is set the date and time formed, where I applied what was suggested and worked perfectly.

Error:

Erro

Solution:

Solução

Browser other questions tagged

You are not signed in. Login or sign up in order to post.