[Resolved] CFDB Time Zone Issue
I have a website being hosted overseas and I am having a problem with the date/timestamp on entries to the database captured by CFDB from a CF7 form.
The server time zone is UTC while the MySQL timezone is set to my local timezone (UTC+11) and the WordPress General Options timezone is also set to local time (UTC+11). The hosting company does not want to change the server time zone because that will affect all domains hosted there.
My difficulty is that CFDB entries are being date/timestamped in server (UTC) date/time instead of local time.
Is there an easy way I can get the CFDB records’ “Submitted” field date/timestamped in the database with my local time, at the point when they are first recorded (i.e. I don’t want to edit the Submitted field)?
Thanks in advance 🙂
You can change the WordPress timezone in the Admin -> General settings. I think the plugin pulls the timezone settings from that (I’d have to check to be sure). If you set WP to the TZ you want, does that work?
Thanks for the speedy reply 🙂
As noted in my original post, I already have my WordPress timezone in Admin > General Settings set to UTC+11. The problem is that the timezone being used by CFDB is UTC+0 (i.e. GMT) which is the server timezone.
I missed that. I can’t think of anything else you can do to change the timezone of the submit time.
Would it be possible for me to make a change to the plug-in code for the submit time to be pulled from the WordPress timezone instead of the server timezone? I would think I’m not the only one experiencing this issue.
You would have to replace various
lines in the code with the timezone you want. It’s not configurable right now.
If you could possibly tell me which plug-in files I’d need to edit I’ll give it a go.
Just reporting back that I have resolved the problem, and the database entries are now correctly recorded in local time.
Thanks for your help.
I am having the same issue. Gillian, can you please respond with the step you took to fixed this?
I added a way to set this in the Database Options panel. I just need to push out an update of the plugin. Will do later today
Thank you so much for adding this option. It is greatly appreciated and my client is super pleased!
Keep up the great work!
I’m confused. I found the option to change it, but it says if left blank, it will pull from the timezone set in WordPress. Is that not true?
That is the expected behavior. Be sure there are no blank spaces in that field.
I’m not sure we’re talking about the same thing. The field is blank by default and the text says, “Timezone to capture Submit Time. Blank will use WordPress Timezone setting.”
But that’s not how it works. If I leave it blank, it’s not giving me the right time.
You are saying that it is not giving the correct time, but you are not saying what it is actually giving you. If blank, it should be giving you the time in the timezone set in Setting -> General -> Timezone. If you don’t get that, what do you get?
- The topic ‘[Resolved] CFDB Time Zone Issue’ is closed to new replies.