You are here: Re: Daylight Savings Time Question « PHP Programming Language « IT news, forums, messages
Re: Daylight Savings Time Question

Posted by Ivαn Sαnchez Ortega on 03/07/07 16:27

dredge wrote:

> Woops, forgot to include that the server is running PHP 4.3.11 I
> believe the date_default_timezone_set function is only available in
> versions 5+

You're right. I'd suggest you to upgrade to a PHP5 webserver.

On the other hand, you can always use time() to get the current timestamp,
at GMT+0, and manually substract 6 hours.

You may also try the time/date functions that format dates - even if the
internal clock is set at GMT (and it's a good idea to rely on GMT, believe
me), if the server is already well configured, you don't have any need to
manually set the timezone - the environment does that.

By the way: please use GMT+0 (or unix timestamps) to keep dates on a
database. If your country follows DST and you use the local date, you may
run into lots of problems.

--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

http://acm.asoc.fi.upm.es/~mr/
Proudly running Debian Linux with 2.6.17-1-amd64-k8 kernel, KDE3.5.3, and
PHP 5.2.0-8 generating this signature.
Uptime: 17:22:08 up 14 days, 22:23, 1 user, load average: 0.65, 0.41, 0.40

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация