Anybody help me out?
- Started
- Last post
- 10 Responses
- ********
This should be interesting.
What's wrong with this code?
// helpers for time things
// time function for right now
function getNow($now=TRUE)
{
$OBJ =& get_instance();return ($now == TRUE) ?
date("Y-m-d H:i:s",time()) :
date("Y-m-d",time());
}I'm getting the following message appearing on the actual homepage of my indexhibit website...
"Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PST/-8.0/no DST' instead in /usr441/home/ ...(blah blah blah) ... /helper/time.php on line 12
- ********0
Orbit
I didnt know you made websites. I thought you were a banker.
- ********0
You've created a hole in the space-time continuum with your faulty code.
- Ah, is that what it is?. I thought it was that, but I couldn't be 100% sure.********
- What with me having no fucking idea at all what the fuck code actually is and all.********
- Ah, is that what it is?. I thought it was that, but I couldn't be 100% sure.
- ********0
Poet is the new pants.
- ********0
Have you checked "What is reality?" thread?
- Where is 'what is reality?' thread?********
- http://notalentcunt.…...********
- Where is 'what is reality?' thread?
- neue75_bold0
I'm thinking the issue might be the bracketed "blah blah blah" I'm not sure that's a valid command...
- out wait.. that's the error...neue75_bold
- < gfyneue75_bold
- ETM0
When you typed the code, now might have equaled true. But now, now is then and so not true.
- ********0
You can never "getNow" since there is always a slight delay between the moment of code execution and the function delivering the result. Change the title of your function to "getThen" and the semantic function naming parser will stop returning an error.
- At this point, and with the knowledge I have at hand, I have no idea if this is good, or just nonsense...********
- So may I just offer a pre-emptive Go Fuck Yourself, or a Heartfelt Thanks, depending on the outcome here.********
- this seems both serious and not serious. so i will laugh while i place my hand on my chin and agree noddingly.capn_ron
- I refer to my Go Fuck Yourself message.
= )******** - Now you're thinking like a programmer!********
- Progress, even in my most retarded moments.********
- hahaah GOOD CHAT!Hombre_Lobo
- At this point, and with the knowledge I have at hand, I have no idea if this is good, or just nonsense...
- ********0
Fixed it.
You code polishers are living in a paper castle. This stuff is piss easy for anyone who decides they want to figure it out.
Watch out.
* Goes all Snake Eyes and stuff, exits room backwards, silently.
- TResudek0
Do you need that "time()" in there? Should the date function not give you the current date/time without that?
- CGN0
you have the code wrong.
() should be (•)