As you know, there are two ways to set the time zone in the WordPress settings:
1. By directly selecting the city > for example, Tehran 2. By selecting the numerical time zone, for example +3:30 is selected instead of Tehran
In your plugin, when the time zone is selected in the settings by method number one, the update (wdt_last_edited_at) and creation (wdt_created_at) time is stored correctly in the database, but when the time zone is selected by method number two, the wrong time of creation (wdt_created_at) and editing (wdt_last_edited_at) is stored in the database.
The reason behind this is that the first approach is the correct one. Once you select the city, all Daylight Savings changes will correctly be applied but if you select UTC+3:30, it will always be UTC+3:30.
When you configure the time zone to be "UTC+1" it will always be UTC+1. So, if we take Belgrade, Serbia as an example - without Daylight Savings Time, it is in UTC+1 time zone, but when Daylight Savings Time starts, Belgrade is in UTC+2. If you leave the time zone to be hard-coded to UTC+1, the times that are stored will not be correctly added in the database.
My advice is to use the city as the time zone due to this, regardless if you're using wpDataTables or not because hard-coded time zones will cause issues with all plugins that store the time in the database.
Hi Team,
As you know, there are two ways to set the time zone in the WordPress settings:
1. By directly selecting the city > for example, Tehran
2. By selecting the numerical time zone, for example +3:30 is selected instead of Tehran
In your plugin, when the time zone is selected in the settings by method number one, the update (wdt_last_edited_at) and creation (wdt_created_at) time is stored correctly in the database,
but when the time zone is selected by method number two, the wrong time of creation (wdt_created_at) and editing (wdt_last_edited_at) is stored in the database.
BR
Hello Sina.
Thank you for reaching out to us.
The reason behind this is that the first approach is the correct one. Once you select the city, all Daylight Savings changes will correctly be applied but if you select UTC+3:30, it will always be UTC+3:30.
When you configure the time zone to be "UTC+1" it will always be UTC+1. So, if we take Belgrade, Serbia as an example - without Daylight Savings Time, it is in UTC+1 time zone, but when Daylight Savings Time starts, Belgrade is in UTC+2. If you leave the time zone to be hard-coded to UTC+1, the times that are stored will not be correctly added in the database.
My advice is to use the city as the time zone due to this, regardless if you're using wpDataTables or not because hard-coded time zones will cause issues with all plugins that store the time in the database.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables