According to php.net, to get the current day of the week you should use

$day = date("l");

So this is my code:

// Set Timezone
date_default_timezone_set('America/New York');
// What day of the week is it (Mon - Sun)
$day = date("l");

But it keeps saying today is "Mon"

This isn't even a full textual representation of the day, it's just a textual representation of a day, three letters which according to php.net is achieved by using date('D') - Yet even when I use this it still says "Mon"

Why is it doing this when today is in fact Friday in New York (Saturday where I am) --- nowhere in the world is it currently Monday!

QMonkey
—
2013-03-30T05:28:45Z —
#2

That is weird. I don't really know why that's happening. One thing, though, "New York" should have an underscore instead of a space. That shouldn't be the problem, though.http://www.php.net/timezones

If you run just that code, $day is "Mon" ?

siteguru
—
2013-03-30T14:11:17Z —
#3

<?php
// Set Timezone
date_default_timezone_set('America/New_York');
// What day of the week is it (Mon - Sun)
$day = date("l");
echo $day;
?>

That shows Saturday for me (since today is Saturday when making this reply).

captainccs
—
2013-03-30T15:21:43Z —
#4

CBResources said:

Why is it doing this when today is in fact Friday in New York (Saturday where I am) --- nowhere in the world is it currently Monday!

Could we see the full code that prints out "Mon?"

StarLion
—
2013-04-01T18:49:46Z —
#5

My first impulse is to say "Your system time is off."... do you get Monday for every date function?