Posted - 02/22/2024 : 18:49:50
If you Google search for " set default timezone php" you will find various suggestions that involves creating and uploading a "php.ini" file. Otherwise, add a line of code to your " includes.php" settings config file like this: date_default_timezone_set('Australia/Sydney');I found neither method would override the server host "php.ini" file anyway. So here is without doubt the easiest and best way to set your "Default Timezone" for the PHP version of Ecommerce Templates: Open your .htaccess file and, up top, add this single line of code: php_value date.timezone 'Australia/Sydney' The full list of PHP Supported Timezones can be found here =>Replace the text ' Australia/Sydney' with your local Timezone. Then upload your amended .htaccess file to the server. Done To TEST and confirm the result: (1) Create a file named for example: date-time.php(2) Here is the simple HTML code for that webpage: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Server Date and Time</title> </head> <body> <?php echo "The default timezone is " . date_default_timezone_get(); echo " and the server date and time is " . date('l jS \of F Y h:i:s A'); ?> </body> </html> (3) Save the file, upload to server and run that date-time.php webpage in your browser. As for the ASP version of Ecommerce Templates, perhaps somebody else may be able to help Regards, Gary
Edited by - ITZAP on 02/22/2024 19:03:03
|