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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.