Jump to content

date_default_timezone_set()


johnnyk

Recommended Posts

Weird problem:

I have a file that I include on every page of my site that looks like this:
[code]
<?php
date_default_timezone_set('US/Eastern');
//functions and variables and what not
?>
[/code]

When I require() that file from a page, it loads fine. But when I require() that file from /cron/main.php (outside the public directory), I get an error that says something like "Call to undefined function date_default_timezone_set()".
If it means anything, main.php is run by a...you guessed it...cron. main.php also require()s two other files, and they get included fine.

Any idea?

(Yay formatting!)
Link to comment
https://forums.phpfreaks.com/topic/16354-date_default_timezone_set/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.