Fix TZ Issue
This commit is contained in:
parent
50d578eea1
commit
cfbbc36116
@ -3,6 +3,9 @@ ob_start();
|
||||
session_start();
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
Dotenv\Dotenv::createImmutable(dirname(__DIR__, 2))->safeLoad();
|
||||
date_default_timezone_set($_ENV['APP_TIMEZONE'] ?? 'Europe/Rome');
|
||||
|
||||
$response = ['error' => '', 'rows' => [], 'columns' => [], 'template_id' => 0, 'filename' => '', 'excel_data' => []];
|
||||
|
||||
try {
|
||||
|
||||
@ -3,6 +3,9 @@ require_once dirname(__DIR__, 3) . '/vendor/autoload.php';
|
||||
|
||||
use Dotenv\Dotenv;
|
||||
|
||||
Dotenv::createImmutable(dirname(__DIR__, 3))->safeLoad();
|
||||
date_default_timezone_set($_ENV['APP_TIMEZONE'] ?? 'Europe/Rome');
|
||||
|
||||
class DBHandlerSelect
|
||||
{
|
||||
private static $instance = null;
|
||||
|
||||
@ -17,6 +17,8 @@ try {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
date_default_timezone_set($_ENV['APP_TIMEZONE'] ?? 'Europe/Rome');
|
||||
|
||||
// Recupera le variabili d'ambiente
|
||||
$dbHost = $_ENV['DB_HOST'];
|
||||
$dbName = $_ENV['DB_DATABASE'];
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
<?php
|
||||
include('include/headscript.php');
|
||||
|
||||
// ✅ FIX timezone (Rome)
|
||||
ini_set('date.timezone', 'Europe/Rome');
|
||||
date_default_timezone_set('Europe/Rome');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || !isset($_POST['template_id']) || !isset($_POST['selected_rows']) || !isset($_POST['filename'])) {
|
||||
header("Location: xlstemplates_grid.php?status=error&message=" . urlencode("Richiesta non valida"));
|
||||
exit;
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
<?php
|
||||
include('include/headscript.php');
|
||||
|
||||
// ✅ FIX timezone (Rome)
|
||||
ini_set('date.timezone', 'Europe/Rome');
|
||||
date_default_timezone_set('Europe/Rome');
|
||||
|
||||
$template_id = intval($_GET['id'] ?? 0);
|
||||
if (!$template_id) {
|
||||
header("Location: xlstemplates_grid.php?status=error&message=" . urlencode("Template ID mancante"));
|
||||
|
||||
@ -10,6 +10,9 @@ error_reporting(E_ALL | E_STRICT);
|
||||
include('../../extra/auth.php');
|
||||
//require_once __DIR__ . '/extra/auth.php';
|
||||
|
||||
// Laravel bootstrap (loaded by auth.php) forces UTC via config/app.php — re-apply our TZ
|
||||
date_default_timezone_set($_ENV['APP_TIMEZONE'] ?? 'Europe/Rome');
|
||||
|
||||
// Here we just check if user is not
|
||||
// logged in, and in that case we redirect
|
||||
// the user to vanguard login page.
|
||||
|
||||
@ -10,6 +10,9 @@ session_start();
|
||||
// Includi PHPSpreadsheet
|
||||
require_once '../../vendor/autoload.php';
|
||||
|
||||
Dotenv\Dotenv::createImmutable(dirname(__DIR__, 2))->safeLoad();
|
||||
date_default_timezone_set($_ENV['APP_TIMEZONE'] ?? 'Europe/Rome');
|
||||
|
||||
$response = ['error' => '', 'rows' => [], 'columns' => [], 'template_id' => 0, 'filename' => ''];
|
||||
|
||||
try {
|
||||
|
||||
@ -8,6 +8,9 @@ ini_set('log_errors', 1);
|
||||
require_once dirname(__DIR__, 2) . '/vendor/autoload.php';
|
||||
require_once __DIR__ . '/class/VisualLimsApiClient.class.php';
|
||||
|
||||
Dotenv\Dotenv::createImmutable(dirname(__DIR__, 2))->safeLoad();
|
||||
date_default_timezone_set($_ENV['APP_TIMEZONE'] ?? 'Europe/Rome');
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
try {
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
<?php
|
||||
include('include/headscript.php');
|
||||
|
||||
// ✅ FIX timezone (Rome)
|
||||
ini_set('date.timezone', 'Europe/Rome');
|
||||
date_default_timezone_set('Europe/Rome');
|
||||
|
||||
$template_id = intval($_GET['id'] ?? 0);
|
||||
if (!$template_id) {
|
||||
header("Location: xlstemplates_grid.php?status=error&message=" . urlencode("Template ID mancante"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user