Display the drop-down list

localtime()

« locale_get_all_variants | log »
<?php
// enter a $time or a $timestamp

date_default_timezone_set(
    
? // string $timezone
);

$timestamp strtotime(
    
 // string $time
);

$array localtime (
    
// [int $timestamp = time()]
    
?  // [bool $is_associative = false]
);
?>
Result
$array = [
  
=> 30,
  
=> 34,
  
=> 16,
  
=> 21,
  
=> 10,
  
=> 119,
  
=> 4,
  
=> 324,
  
=> 0,
]
Examples
#1 localtime  (/* $timezone = "UTC" */
 /* $time = "2000-01-01 12:00:00" */
 
$timestamp)
#2 localtime  (/* $timezone = "UTC" */
 /* $time = "2000-01-01 12:00:00" */
 
$timestamp,
 
true)
#3 localtime  (/* $timezone = "UTC" */
 /* $time = "" */
 
946728000,
 
true)
#4 localtime  (/* $timezone = "UTC" */
 /* $time = "" */
)
See also
date_default_timezone_set, getdate, strtotime