Click here to Skip to main content
15,886,258 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Contact form Problem: when go back to the input page, no data stored Pin
Graham Breach11-Aug-10 9:19
Graham Breach11-Aug-10 9:19 
AnswerRe: Contact form Problem: when go back to the input page, no data stored Pin
cjoki12-Aug-10 5:05
cjoki12-Aug-10 5:05 
QuestionBNF Grammar for PHP Pin
DaveX867-Aug-10 12:28
DaveX867-Aug-10 12:28 
AnswerRe: BNF Grammar for PHP Pin
mabo4211-Aug-10 22:36
mabo4211-Aug-10 22:36 
GeneralRe: BNF Grammar for PHP Pin
DaveX8612-Aug-10 4:01
DaveX8612-Aug-10 4:01 
QuestionFedora not recognizing wireless router Pin
AmbiguousName7-Aug-10 1:12
AmbiguousName7-Aug-10 1:12 
QuestionTime Zone Conversion PHP [modified] Pin
DinoRondelly5-Aug-10 8:56
DinoRondelly5-Aug-10 8:56 
AnswerRe: Time Zone Conversion PHP [modified] Pin
Peter_in_27805-Aug-10 13:56
professionalPeter_in_27805-Aug-10 13:56 
This is a cut'n'paste from the DateTime::setTimezone section of the PHP manual:

Example #1 Setting and getting DateTimeZone objects

<?php
date_default_timezone_set('Europe/London');

$datetime = new DateTime('2008-08-03 12:35:23');
echo $datetime->getTimezone()->getName() . "\n";

$datetime = new DateTime('2008-08-03 12:35:23');
$la_time = new DateTimeZone('America/Los_Angeles');
$datetime->setTimezone($la_time);
echo $datetime->getTimezone()->getName();
?> 
The above example will output:

Europe/London
America/Los_Angeles

Elsewhere in the date/time chapter there are heaps of examples of various date/time manipulations. What I think you want to do is something like this:
$datetime = new DateTime(something);
$datetime->setTimezone(xxx);
$timexxx = $datetime->format($formatstring);
$datetime->setTimezone(yyy);
$timeyyy = $datetime->format($formatstring);

[edit]fixed html quoting[/edit]
Software rusts. Simon Stephenson, ca 1994.
modified on Thursday, August 5, 2010 8:47 PM

AnswerRe: Time Zone Conversion PHP Pin
sonam_12325-Aug-10 10:35
sonam_12325-Aug-10 10:35 
QuestionCompiling MD5 on linux shell Pin
xivShin2-Aug-10 2:20
xivShin2-Aug-10 2:20 
AnswerRe: Compiling MD5 on linux shell Pin
markkuk2-Aug-10 2:57
markkuk2-Aug-10 2:57 
QuestionAuto Change Selection in Combo Box Pin
ChrisMaile30-Jul-10 6:17
ChrisMaile30-Jul-10 6:17 
AnswerRe: Auto Change Selection in Combo Box [modified] Pin
enhzflep30-Jul-10 16:26
enhzflep30-Jul-10 16:26 
QuestionMYSQL connect through PHP Pin
offroaderdan30-Jul-10 0:23
offroaderdan30-Jul-10 0:23 
AnswerRe: MYSQL connect through PHP Pin
Graham Breach30-Jul-10 21:40
Graham Breach30-Jul-10 21:40 
AnswerRe: MYSQL connect through PHP Pin
Shamit Kumar Tomar9-Aug-10 18:28
Shamit Kumar Tomar9-Aug-10 18:28 
AnswerRe: MYSQL connect through PHP Pin
Rockyonfire15-Aug-10 11:48
Rockyonfire15-Aug-10 11:48 
QuestionHow to display the image in html Pin
sarang_k26-Jul-10 20:52
sarang_k26-Jul-10 20:52 
AnswerRe: How to display the image in html Pin
Peace ON27-Jul-10 0:45
Peace ON27-Jul-10 0:45 
AnswerRe: How to display the image in html Pin
bishtharish27-Jul-10 23:09
bishtharish27-Jul-10 23:09 
QuestionHow to convert from pdf to doc in php Pin
sarang_k26-Jul-10 18:52
sarang_k26-Jul-10 18:52 
QuestionPostmaster Redirect - Mailsystem Failure Delivery Pin
Jayapal Chandran26-Jul-10 7:59
Jayapal Chandran26-Jul-10 7:59 
Questionchoosing a opensource cart Pin
duta25-Jul-10 5:06
duta25-Jul-10 5:06 
QuestionHow to embedded the image in doc using php Pin
sarang_k23-Jul-10 1:04
sarang_k23-Jul-10 1:04 
AnswerRe: How to embedded the image in doc using php [modified] Pin
enhzflep24-Jul-10 21:17
enhzflep24-Jul-10 21:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.