Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Descrepancy in Time Sent when using CFMAIL tag

Status
Not open for further replies.

ljevans

Technical User
Apr 4, 2001
53
US
This is a problem in all of my ColdFusion apps. Example: I use CFMAIL to send users an e-mail when they are assigned DRs (Discrepancy Requests). There seems to be an 8 hour difference in when I send the message to the time displayed in the user's e-mail message. The time and the time zone settings are correct on the server and the receiving computers. Any ideas?
 
Just in case you haven't been following it, check out the thread I started with the subject "Another CFMAIL question". Maybe there are some ideas there that will help you. Calista :-X
Jedi Knight,
Champion of the Force
 
Hey Ljevans,

I found some info on this while trying to help Calista. It appears that this is a bug in CF 4.5 that may or may not be fixed in SP2. I couldn't determine based on the information I saw but it sounds like you can try un-checking daylight savings time or installing SP2. Either of these may work for you. Someone in the allaire forums posted this as a possible workaround as well.

<CFSET tzStruct = GetTimeZoneInfo()>
<CFSET dateString =
&quot;#DateFormat(Now(),'DDD, DD MMM YYYY')#&quot;
& &quot; #TimeFormat(Now(),'HH:mm:ss')#&quot;
& &quot; -&quot;
& &quot;#NumberFormat(tzStruct.utcHourOffset,'00')#&quot;
& &quot;00&quot;>

Then in all of your CFMAIL tags on the same page put the following:

<CFMAILPARAM NAME=&quot;Date&quot; VALUE=&quot;#dateString#&quot;>

Good luck,
GJ
 
I have tried your suggestion of un-checking daylight savings time setting on my server. This alone brings me to within 1 hour of the correct time. If I put the code in as well, I get the correct time in e-mail. What are the ramifications of un-checking daylight savings time setting on my sever, other than manually setting the time when the time changes?
 
I'm not aware of any problems. To the best of my knowledge, this simply updates your time automatically twice a year. Not using it would mean you have to automatically set these if you want to stay in sync with everyone else.

I really wouldn't be surprised though if someone wrote software that assumes this will be checked and has a problem with it. I think this would be unlikely but I've seen a lot of quirky things over the years ;)

GJ
 
I have some users that are very picky on things such as date and time, although it is so unimportant in the grand scheme of things (the intention of the application). Thanks for all your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top