Local sunset time.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yshaf13
Forum Commoner
Posts: 72
Joined: Mon Apr 03, 2006 7:59 pm

Local sunset time.

Post by yshaf13 »

Hi, I'm writing a script that would need to change every day at sunset. My question is, how can I get the client's local time and how can I find out when sunset is for his time zone?
User avatar
Mds
Forum Contributor
Posts: 110
Joined: Tue Apr 22, 2008 8:56 pm
Contact:

Re: Local sunset time.

Post by Mds »

if you want get client's local time you have to use javascript.
but with date_default_timezone_get you can get server's default time zone
-------------------------------------------------
date_default_timezone_get
(PHP 5 >= 5.1.0RC1)

date_default_timezone_get -- Gets the default timezone used by all date/time functions in a script
Post Reply