Click to See Complete Forum and Search --> : Silly FormMail Question!


mdjt
08-01-2006, 10:40 PM
I know the answer to this is so simple that I'll probably bash my head into the monitor, but I would appreciate help from someone who knows the answer!

I'm using FormMail.pl (the nms version from SourceForg.net originally) and don't have any problems with it, EXCEPT that I just can't seem to get the date offset right. I'm in Australia and just want to date stamp responses with my local time, not the US-hsoted server I'm on. The default setting is as follows (GMT). How do I change it to give GMT +10?

$date_fmt = '%A, %B %d, %Y at %H:%M:%S';

Like I said, the answer's probably really basic and though I've read and re-read the configuration instructions, and tried all sorts of variations, but I still can't get it right! Duh! :confused:

LeeU
08-02-2006, 09:33 AM
Try this (http://www.perl.com/pub/a/2003/03/13/datetime.html) or this (http://www.aota.net/Script_Installation_Tips/perltime.php4). I haven't read them but they may help.

CyCo
08-02-2006, 05:49 PM
Do a search for these lines (between the asterisks) in FormMail.pl

*****************************************************

=item C<date_offset>

The empty string to use local time for the date, or an offset from GMT
in hours to fix the timezone independent of the server's locale settings.

Default: ''

*****************************************************

Change

Default: ''

to

Default: 10

mdjt
08-02-2006, 11:27 PM
Thanks so much for that CyCo! It worked. I had been entering 10 in that line, but I left the ' ' in, so that was why it didn't work. The FormMail documentation isn't very clear on that, so thanks again for pointing me in the right direction. Have decided not to bash my head into the monitor this time! :)

mdjt
08-02-2006, 11:32 PM
Thanks, Lee. I've bookmarked these as they also have some useful info which I'm sure I can make use of in other areas.