HomeFriday, June 23, 2017, 06:58:28
1

PHP DateTimeZone

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

PHP Cookies and Sessions Tutorial

PHP Cookies and Sessions Tutorials

Password Protect With PHP

Password protect tith PHP - tutorial

Random MySQL Query

Random MySQL query, requirement(s): PHP Server, MySQL

Convert pdf to image - mpdf

Convert pdf file to jpg with php and mpdf

PHP Trim

trim() Strip whitespace (or other characters) from the beginning and end of a string.

HTML Button Generator

This script will allow your visitors to create HTML Buttons online. To use the "html button generator" script completely free , the "powered by" link at the bottom of the pages must stay intact.

Show / Hide Div with CSS

CSS Display and Visibility:The visibility property specifies whether or not an element is visible.

PHP imagecreate

imagecreate() returns an image identifier representing a blank image of specified size.

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.

Comments 1.1. :: PHP Script

This script allows your visitors to add comments to any single page on your web site.
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.