PHP Timezone and Day of the week function
Moderator: General Moderators
PHP Timezone and Day of the week function
I don't understand how the two functions mentioned in the name above work, so I need some help. I want to make a php file with those two functions by entering my time zone so it knows what day of the week it is where I live and to display that day. My time zone is GMT +3. I would really appreciate it if someone can help me with this script. 
Re: PHP Timezone and Day of the week function
so can someone help ?
-
mattbranch12
- Forum Newbie
- Posts: 18
- Joined: Thu Jul 09, 2009 3:14 pm
- Location: Hagerstown, MD
Re: PHP Timezone and Day of the week function
You can set the time zone using this function
All you have to do is replace America/Los_Angeles with the time zone that you want.
Here is a list of Time zones.
http://www.php.net/manual/en/timezones.php
Code: Select all
date_default_timezone_set('America/Los_Angeles');Here is a list of Time zones.
http://www.php.net/manual/en/timezones.php
Re: PHP Timezone and Day of the week function
thanx for that, but it's not the only thing that I needed. I also need a way to display what day of the week it is.
-
mattbranch12
- Forum Newbie
- Posts: 18
- Joined: Thu Jul 09, 2009 3:14 pm
- Location: Hagerstown, MD
Re: PHP Timezone and Day of the week function
Pretty easy to print the day of the week.
Code: Select all
echo date("l");Re: PHP Timezone and Day of the week function
thanx a lot!!!