Page 1 of 1

Local sunset time.

Posted: Tue Apr 22, 2008 12:28 pm
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?

Re: Local sunset time.

Posted: Tue Apr 22, 2008 9:30 pm
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