Ad block is installed and active. Please support us by disabling it.
HomeFriday, September 22, 2017, 00:46:34
1

PHP DateTimeZone

Tuesday, February 10, 15, 13:53:03, 3 Yaers Ago Via wain, Hits: 2785
PHP representation of time zone
Example:
Code:
<?php
$date_at_timezone = new DateTimeZone('Europe/London');
$date_at_timezone2 = new DateTimeZone('Europe/Belgrade');
$date_at_timezone3 = new DateTimeZone('Australia/Queensland');
$date_at_timezone4 = new DateTimeZone('Australia/Sydney');
$date = new DateTime();
$date->setTimezone($date_at_timezone);
echo $date->format('l dS F Y h:i:s A') . " London<br>";
$date->setTimezone($date_at_timezone2);
echo $date->format('l dS F Y h:i:s A') . " Belgrade<br>";
$date->setTimezone($date_at_timezone3);
echo $date->format('l dS F Y h:i:s A') . " Queensland<br>";
$date->setTimezone($date_at_timezone4);
echo $date->format('l dS F Y h:i:s A') . " Sydney<br>";
?>


Output:
Wednesday 29th September 2010 01:22:24 PM London
Wednesday 29th September 2010 02:22:24 PM Belgrade
Wednesday 29th September 2010 10:22:24 PM Queensland
Wednesday 29th September 2010 10:22:24 PM Sydney

Sign In

Sponsor

Related

Link Base Pro :: Free Link Index Script

This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links.

Sending HTML Email With Images - PHP Tutorial

Sending HTML Email With Images - Upload Image with PHP - Creating Dynamic Webpages Using PHP and MySQL - Select, Delete, Update..

E-Cards 1.1. PHP Script

This script will allow your visitors to send e-cards to their friends. It features admin notification and HTML output.To use the "e-cards" script completely free , the "powered by" link at the bottom of the pages must stay intact.

PHP Links Script 1.1.

This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links. The script is easy to customize to suit your needs.

Jquery PHP Contact Form

This script allows your visitors to send you an email directly from your website.

Creating a Math CAPTCHA with PHP - PHP Tutorial

This tutorial will show you how to create a form with Math Captcha.

PHP str_replace

str_replace - This function returns a string or an array with all occurrences of search in subject replaced with the given replace value

PHP $_POST Function

Collect values from a form sent with method post

Upload Attachment - PHP Tutorial

Upload attachment with PHP example, Requirement(s): PHP server

PHP/MySQL Bookmarklet - PHP Tutorial

PHP/MySQL bookmarklet, bookmark current page, PHP/MySQL tutorial.
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Thu, Jun 15, 17
So far has created 115 entries.
wain
This author has not yet filled in any details.