<?php
header('Content-Type: application/json');

// Test current time
$now = new DateTime('now', new DateTimeZone('Asia/Kolkata'));
$currentHour = (int)$now->format('H');
$currentMinute = (int)$now->format('i');

echo json_encode([
    'success' => true,
    'current_time' => $now->format('Y-m-d H:i:s'),
    'current_hour' => $currentHour,
    'current_minute' => $currentMinute,
    'timezone' => 'Asia/Kolkata',
    'server_time' => date('Y-m-d H:i:s'),
    'server_timezone' => date_default_timezone_get()
]);
?> 