Ad block is installed and active. Please support us by disabling it.
HomeWednesday, April 25, 2018, 08:56:07
1

PHP DateTimeZone

Tuesday, February 10, 15, 13:53:03, 3 Yaers Ago Via wain, Hits: 6088
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

Getimagesize

Getimagesize function will determine the size of any given image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag and the correspondant HTTP content type.

Contact Us PHP Form 1.1.

A contact us form with email and form field validation. It allows your visitors to send you an email directly from your website.

PHP explode

Explode — Split a string by string.

Upload Image with PHP [Example2]

[Example2] Tutorial - How to upload and resize image with PHP

Creating a CAPTCHA with PHP :: PHP Tutorial

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

Prevent the error loading XML – libxml_use_internal_errors

libxml_use_internal_errors() allows you to disable standard libxml errors and enable user error handling.

PHP form with image upload

Advanced Contact Form with email and form field validation.It allows your visitors to send you an email directly from your website.Features: Image Upload, HTML Output, Captcha Image.

PHP Cookies - setcookie

Defines a cookie to be sent along with the rest of the HTTP headers.

PHP Jquery Form

PHP Jquery Form allow your visitors to contact you directly from your website.

Adodb Recordcount Example

RecordCount returns the number of rows in the record set.
About Author

wain

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