Closed sandy-abrightmind closed 8 years ago
Yeah, it should listen to Craft's timezone setting as well
I have tried setting the timezone setting in CraftCMS and it doesn't change the datetime value that is inserted into the DB. =( I was hoping it would.
Ah, yeah thats true. The value that gets inserted in your db depends on your server time settings.
I have the Timezone set in the General Tab to CDT America/Chicago and it still puts the datetime as UTC. I ran into some issues the other day so that's the only reason I noticed it.
I also tried setting it in the general.php file but that didn't do anything either.
My server is in CDT Timezone.
That's really weird. I would'nt know why.
Oh... do you know where in the plugin code that it pulls in the datetime data or where it sets the Timezone?
Its Craft that does it. It's using the dateCreated
column right?
Yes. dateCreated and dateUpdated. Both are in UTC for the notifications table.
These are default Craft columns. You should probably ask them why this is UTC.
Ok. Thank you. If you leave this open, I'll respond if/when I figure it out.
So, the standard is UTC. Basically, all data should be stored in UTC in the database. If you need to use this data elsewhere then it's best to convert it in other scripts to whatever Timezone you need.
Is the alert datetime value that is inserted in to the database for new alerts in UTC time???