change the date

More
11 years 6 months ago - 11 years 6 months ago #1152 by julius85
change the date was created by julius85
hello,

i am using field date, in the database it show the correct date but when i call from joodb it changed the day. sometimes change the day and month but never the year?
Last edit: 11 years 6 months ago by joest.

Please Log in to join the conversation.

More
11 years 6 months ago #1153 by Dirk
Replied by Dirk on topic Re: change the date
I tested it and I can not confirm the bug.
At the backend we use the sql-notation for dates.

yyyy-mm-dd

If you use the calendar widget it will automatically show the right format.

Please Log in to join the conversation.

More
11 years 6 months ago #1155 by julius85
Replied by julius85 on topic Re: change the date
thanks for the replay,
i send you some images to show the problem, in this case it adding one more day but in others change day and month

This image is hidden for guests.
Please log in or register to see it.


This image is hidden for guests.
Please log in or register to see it.



hope some help

Please Log in to join the conversation.

More
11 years 6 months ago #1158 by Dirk
Replied by Dirk on topic Re: change the date
That's strange. Joodb uses the joomla jhtml function to convert date into the current language format!

If the type of your date field is REALLY date it should work. Especially if you have the same dates.

[code type=php-brief]$field= JHTML::_('date', $field, JText::_('DATE_FORMAT_LC3'));[/code]

Try to switch the frontend language to english. Are the dates still wrong?
Try to disable cache if enabled!

Please Log in to join the conversation.

More
11 years 6 months ago #1160 by Dirk
Replied by Dirk on topic I guess I found the solution
If you look at your example. The output dates are always the previous day.

Most likely the timezones are not the same!

Try to set the timezone in Joomla.

Please Log in to join the conversation.

More
11 years 6 months ago #1162 by julius85
Replied by julius85 on topic Re: change the date
thanks for the replay, in this example only change one day but in others change months and days. I change my front site english, change the joomla timezone and my php timezone send you te photo?
[img]http://www.solucioneswebmexico.com/images/timezone.jpg[/img]

hoppe some help?

Please Log in to join the conversation.

Moderators: Dirkjoest