Hi!
I have a form that saves data to a database table. I use created:{date:Y-m-d H:i:s} in the field 'Data override on Insert'. This inserts the current date/time in the database table. Works fine, but I was wondering if it is possible to save this date/time in our own timezone?
Kind regards,
Jip
Hi Jip,
Its better to save the time in GMT but display it later in whatever timezone you want:
{date.-0500:Y-m-d H:i:s$(data:time)}
Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
OK, thanks for this Max.
We store this value in the database (GMT - default) but after this we extract the data to a csv file. In the CSV file I would like to have the 'local' time, so that's the 'display' part of the date. I don't think it is possible to do this in the CSV export settings?
It would be best to actually use the timezone set in Joomla to 'display' the dat in the CSV file. Maybe there would be a way to convert the date between saving it in the database and exporting it to the CSV? But that would make it a quit more complex I guess.
I could also just let the client know he has to be aware the time in the CSV is GMT ;-) It's not a big deal!
Thanks so far!
Hi Jip,
You can modify the date before the data is added to the CSV using some PHP code, but the better here is to tell the client that dates are in GMT time, maybe they need to import it later into database ?
Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
I think we'll just leave it as it is and tell the client the have dot the math themselves for now ;-) And indeed, if they ever need to import this in to a database this will keep it GMT.
Thanks Max.
Hi Jip,
No problems!
Best regards,
Max
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?