PHP Classes

File: php/getCurrentTime.php

Recommend this page to a friend!
  Classes of bamigboye biodun   Logical Functions   php/getCurrentTime.php   Download  
File: php/getCurrentTime.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Logical Functions
General-purpose PHP and JavaScript functions
Author: By
Last change:
Date: 9 months ago
Size: 258 bytes


Class file image Download
function getCurrentTimeWithZone(string $timeZone = null)
  if (
$timeZone) {
$timeZone = new DateTimeZone($timeZone);

$date = new DateTime("now", $timeZone);

$date->format('Y-m-d H:i:s');