Results 1 to 6 of 6

Thread: Adjust Timezone

Hybrid View

  1. #1
    Join Date
    Jul 2007
    Posts
    9

    Default Adjust Timezone

    Okay, I've managed to configure formmail to work perfectly and it has already effectively stopped hundreds of spam mails that would have normally come in over the past 2 days ...but I just noticed that the time stamp (from the $time field in my template) is 2 hours behind. I have searched through documentation and the forum but have not found a simple explanation how to adjust this.

    The closest thread I found on this topic is this:
    http://www.tectite.com/vbforums/show...=2642#poststop

    But I still don't understand what I need to do. Any help would be great.

    Thanks,

    Mandy

  2. #2
    Join Date
    Jul 2007
    Posts
    1

    Default Re: Adjust Timezone

    Hello Mandy,

    I too was having the issue with the time zone, but I figured out how to fix it from the link you shared.

    All I had to do was paste this bit of code at the very top of the php script and it worked perfectly:

    <?
    putenv("TZ=US/Eastern");
    ?>

    Paste it at the very top before everything else on the page. Also, I don't know what time zone you are in, but you will want to change it to where you are. I am in the Central time zone so my code looked like this:

    <?
    putenv("TZ=US/Central");
    ?>

    Once I did this my time stamp was correct. I hope this helps.

    Tyy

  3. #3
    Join Date
    Jul 2007
    Posts
    9

    Default Re: Adjust Timezone

    Ahh ..yes, thank you. That was the code I needed. I had skipped further down that post to the reply where it said to put this code:
    <?
    putenv
    ("PHP_TZ=US/Eastern");
    ?>
    Take out the 'PHP_' part and it works.

    Thanks for your reply.

  4. #4
    Join Date
    Jun 2013
    Posts
    1

    Default Re: Adjust Timezone

    I found this config setting that does the trick:

    date_default_timezone_set('US/Eastern');

  5. #5

    Thumbs up Re: Adjust Timezone

    thanks for help

  6. #6
    Join Date
    Mar 2014
    Posts
    1

    Default Re: Adjust Timezone

    Thank you for helping me to solve the same problem.
    Miguel

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Easy way to adjust server time with script?
    By djdevine in forum FormMail Subscription Support
    Replies: 6
    Last Post: 29-Sep-2005, 08:23 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •