<?php function get_time($zone_key){ $tz = new DateTimeZone($zone_key); $data = new DateTime(date("Y-m-d H:i:s")); $data->setTimezone($tz); //$data = new DateTime(date("Y-m-d 00:00:00"),$tz); return $data->format("r"); } if (!empty($_POST)){ echo get_time($_POST["timezone"]); } $zones = timezone_identifiers_list(); ?> <form action="" method="post"> <select name="timezone"> <?php foreach ($zones as $key) { ?> <option value="<?=$key;?>"><?=$key;?></option> <?php } ?> </select> <input type="submit" value="Select" /> </form>
Dear immortals, I need some wow gold inspiration to create.