Last table update date seen in phpMyAdmin

Hello,

Last table update date seen in phpMyAdmin
phpMyAdmin-5-2-0

Output from test.php page with php mysql query
test-php

My question is
What time zone does this date save using?
I want to use it for
when i want to do database backup, i will not back up tables not updated after last backup time

Since I will compare this last updated time as unix timestamp, I think I need to get timestamp based on server time

Sample:

$last_backup_time = '1672203200';
$last_table_updated_time = '1672207200';
if($last_table_updated_time > $last_backup_time){
// backup the table
}

Is it healthy to use the data of the last updated time of the table?

Time zones are ALWAYS on the server. So, if it is, let’s say for talking, that it is a Godday server,
it might be in Iowa,US or New York, US or Taiwan,CH… Who knows.
Also, for MySQL tables it is YYYY-MM-DD HH:MM:ss for the time format.

If you have access to your PHP.ini file on your server you can change it there by entering your zone.

If not, you can just set it at the top of every page or put it into your config.php file and have that at the top
of every page. You set it like this: ( Sample is for New York City, US )

date_default_timezone_set(“America/New_York”);

You can google search for the list of time zones if you do not know yours. Hope that helps.

@ErnieAlex Thank you

i did something like this

$server_time = date('Y-m-d, H:i:s');
$date_default_timezone = date_default_timezone_get();
	
setlocale(LC_ALL, 'tr_TR.UTF8');
date_default_timezone_set( $settings['timezone'] ?? 'Europe/Istanbul' );

$locale_time = date('Y-m-d, H:i:s');

I added the time zone setting to the administration panel as follows
Ekran görüntüsü 2022-12-29 113741

I did it like this I don’t know how true it is

EDIT, forgot to write
I tried on local and remote server
It doesn’t matter what the local time time zone is, Myqsl last update time shows local time.
always same with query or phpmyadmin screen, my local time

Sponsor our Newsletter | Privacy Policy | Terms of Service