简体   繁体   中英

Joomla Calendar Field Type

I have implemented a module which has a Calendar Type as following:

  <field 
                   name="file2calendarEnd" 
                   type="calendar" 
                   default="5-10-2008" 
                   label="End date" 
                   description="Select when the slide will be published" 
                   format="%d %B %Y" />

The problem is, when I open the module from the backend, pick a date, for example "23-10-2016" and save it, the next time I open the module , the date will display "22-10-2016". No matter what date I pick, the module will substract a day when I open it.

The date saves correctly on the databse, because if I pick "23-10-2016" on the module, saves it, and then print it on the frontend, the website will display "23-10-2016" , but if I open the module on the backend, the date will display "22-10-2016".

What can be causing the module to substract a day each time I open the module? Thank you

I Test your code on localmachine and it works well.

But got the same issue when i change User Time zone from Default to New York

you can change user timezone in Users > Manage > your user > Basic Settings

You can also check at Global Configuration > Server Settings.

Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM