You are here: date() function - problem changing timezome « All PHP « IT news, forums, messages
date() function - problem changing timezome

Posted by shannonwhitty on 09/28/83 11:49

Please help,

I am running a database on a free server in another country and the
timezone is obviously different. All I want to do is add 15 hours to
the timezome before updating the database (or on update would be
fine!!!)

I can output the current timestamp perfectly as:

echo date("Y-m-d H:i:s");

2006-06-05 07:20:57

But when I try to use the Z function I can't get it to work... There is
very little help or working demos on this anywhere on the internet...

echo date("Y-m-d H:i:s", date("Z +54000"));

1969-12-31 13:00:00

As you can see, this sets the timezone well and truly miles from where
I want it to be...

I can't find an easy way to do it but all I want to do is something
like the following:

UPDATE 'table' SET 'date' = CURRENT TIMESTAMP +15:00

Why can't it be that easy???

BTW I've been programming in PHP for 3 days now so I am quite new so
please go easy...

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация