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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tip: ColdFusion and SQL Azure - time

Status
Not open for further replies.

TimeTraveler

IS-IT--Management
Nov 20, 2001
99
US
Situation: You've inherited a setup where running ColdFusion on Windows Server on one box, and a db server, say SQL Server, on a Windows Server on another box. Server time for both were set to local time. Your site is getting more popular and you decide to move the db to SQL Azure.

Keep in mind if you migrate to SQL Azure, your DB time in this situation will change to GMT/UTC. There is no other option at this time with SQL Azure.

So, if previously, your server was set to local time (happens in many Windows server setups), and you were say using a colo DB server also set to local time, your reporting everywhere is going to be messed up. Also, any time inserts where you are using now() vs getDate() is going to be a headache, too.

1. Comb through your CFML code base and look for where now() is used for any date-critical coding, and replace it with some (switchable) offset scheme. Or, do/find a pull from the db and do a date diff from that to report where you would use now().

2. Figure out with the powers that be what they want to do with any previous date-stamped data. Their options basically boil down to leave as is, or adjust all the date fields prior to the switch over to the adjusted time. Have how you're going to do this figured out before you ask them.

3. For display, if your code is old and not timezone ready/compliant, then figure that out as well. I saw a couple other posts on this forum about date offsets, so check those.

Any other thoughts on this, please reply to this post. I myself am still working through issues on this. One solution I've been using is to report time passed vs. the actual date.

Enjoy,

S



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top