The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. October 14, 2019, 06:59:56 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Using the pear date class  (Read 1816 times)
thedarkness
Lifer
*****
Offline Offline

Posts: 585



View Profile
« on: April 25, 2007, 07:39:55 PM »

pear install Date

Code:
<?php

  
require_once( 'Date.php' );

  
$date =& new Date();

  
$date->setTZbyID'Australia/Brisbane' );

  
$date->setDatedate"Y-m-d H:i:s" ) );

  print 
$date->format'Brisbane:%t%A %d of %B %Y %H:%M:%S%n'  );

  
$date->convertTZbyID'Europe/London' );

  print 
$date->format'London:%t%t%A %d of %B %Y %H:%M:%S%n'  );

  
$date->convertTZbyID'America/New_York' );

  print 
$date->format'Miami:%t%t%A %d of %B %Y %H:%M:%S%n'  );

  
$date->convertTZbyID'America/Los_Angeles' );

  print 
$date->format'Los Angeles:%t%A %d of %B %Y %H:%M:%S%n'  );

?>

Logged

"I want to be the guy my dog thinks I am."
 - Unknown
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!