Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC:

change the date 9 years 1 month ago #1152

  • julius85
  • julius85's Avatar Topic Author
  • Offline
  • Posts: 7
  • Thank you received: 0
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?

Please Log in or Create an account to join the conversation.

Last edit: by joest.

Re: change the date 9 years 1 month ago #1153

  • Dirk
  • Dirk's Avatar
  • Offline
  • Posts: 1186
  • Karma: 21
  • Thank you received: 225
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 or Create an account to join the conversation.

Re: change the date 9 years 1 month ago #1155

  • julius85
  • julius85's Avatar Topic Author
  • Offline
  • Posts: 7
  • Thank you received: 0
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 or Create an account to join the conversation.

Re: change the date 9 years 1 month ago #1158

  • Dirk
  • Dirk's Avatar
  • Offline
  • Posts: 1186
  • Karma: 21
  • Thank you received: 225
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 or Create an account to join the conversation.

I guess I found the solution 9 years 1 month ago #1160

  • Dirk
  • Dirk's Avatar
  • Offline
  • Posts: 1186
  • Karma: 21
  • Thank you received: 225
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 or Create an account to join the conversation.

Re: change the date 9 years 1 month ago #1162

  • julius85
  • julius85's Avatar Topic Author
  • Offline
  • Posts: 7
  • Thank you received: 0
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 or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: Dirkjoest