Help with finding code for dates

Status
Not open for further replies.

justlovejoomla

New Member
Hi & Thanks for your program - we are using joomla 3.2 and fabric 3.1b - we have tried to upgrade with git - but then we had other problems - so we are locked into this as we are along way down the track now.

Background - it's a long story - but have had a lot of trouble with dates - being in Australia - so what I've decided to do is make all database dates - store and retrieve in UTC plus I'm keeping joomla time zone as UTC.

So it's all basically utc and by not inputting hours or mins ( time) we have reliable dates to view / store/ import and export.

Problem - However this falls through with any sort of timestamp through fabrikar - we plan to modify the code to add 11 hours to the time to correct for this, we just need to know where to find the relavant code to manipulate the data (date) before it is input)

The problem occurs when we format an element in fabrik admin - e.g. created date field to put it today's date - ( select current date) - then it uses the actual utc which is 11 hours off.

Aside -
INTERESTINGLY - Using date picker / calendar pop - when you click TODAY on the picker - I have no idea how - but it always picks the correct day for the Australian time zone ( despite the server being in US, the joomla time-zone set to utc) - which is great.


THE QUESTION - we really just need to know where is the code in fabrikar for the inputting of the "current"datetime" as selected as an element datetime option ( not the pop up calendar which must have a different origin)

ps - We are basically trying to manipulate the data before input in these fields - not sure if there is another way to do that.

Thanks!
 
Hi
Sounds like you are going to make things very very difficult for yourselves!
Date elements should work, I think even in 3.1b (although eek thats a long time ago and a lot of stuff has been fixed since then!), certainly if you set them to store as UTC, then they use what ever the site's timezone is to offset them on display and reset them on save back to UTC time.

If however you tried that and for what ever reason that's not going to work for you then I think the only way you could alter the form's data on submission is to assign a PHP form plugin to every form you have, the docs on the plugin are here http://fabrikar.com/forums/index.php?wiki/php-form-plugin/
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top