Re: Time zones in CF Applications

2010-08-25 Thread Ras Tafari
dateAdd() function in sql server would transform it for ya... sure On Wed, Aug 25, 2010 at 12:45 PM, Vivec wrote: > > Hmm...well..all the javascript etc. sounds great. > But... > Is there SQL code that will take the GMT time , and then subtract 4 hours > from it so that it corresponds to -4 G.M.

Re: Time zones in CF Applications

2010-08-25 Thread Vivec
Hmm...well..all the javascript etc. sounds great. But... Is there SQL code that will take the GMT time , and then subtract 4 hours from it so that it corresponds to -4 G.M.T. ? And I can store that value into the database. I'm taking over this application from another developer, and the time to a

Re: Time zones in CF Applications

2010-08-24 Thread Medic
> > > as long as it's consistent... > +1. That's the key right there. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: htt

Re: Time zones in CF Applications

2010-08-24 Thread Ras Tafari
if its ALREADY stored in trini-time, then id figure out what the UTC offset is for that, store it in an application variable, and then with javascript, figure out where the user is in relation utc, set a javascript cookie for that utc offset (which is retrievable via cf as well), then with those t

Re: Time zones in CF Applications

2010-08-24 Thread Cameron Childress
In MS SQL I think you can use SYSUTCDATETIME() to get the UTC Date and Time. Medic mentioned *not* using the SQL Server date and time, but I actually usually *do* use the SQL Server Date/Time since I know it's typically doing to be consistent. Otherwise in an environment where you have clustered

Re: Time zones in CF Applications

2010-08-24 Thread Medic
Ah, I believe it's: GETUTCDATE() ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-co

Re: Time zones in CF Applications

2010-08-24 Thread Medic
I generally don't use a DB default for date anymore. I just add in the insert query. Without looking I *think* there's a getUTC() kindof function, but I can't remember off hand right now. On Tue, Aug 24, 2010 at 3:48 PM, Vivec wrote: > > Ok...I see where it is stored. > > In the MS SQL databas

Re: Time zones in CF Applications

2010-08-24 Thread Vivec
Ok...I see where it is stored. In the MS SQL database for the dateadded field there is a Default Value of: (getdate()) :-\ sooouhhh...what do I do now :-| On 24 August 2010 15:28, Jacob wrote: > > Use UTC time for transactions and storage? > > ~

Re: Time zones in CF Applications

2010-08-24 Thread Medic
I use UTC for ALL database stuff and then just adjust based on the locale of the user. I learned the hard way years ago when I switched hosts and they were in a different timezone. All my db transactions used getDate() (or whatever the syntax is) and it essentially broke my app in a big way. UTC

Re: Time zones in CF Applications

2010-08-24 Thread Judah McAuley
Store all datetimes in UTC in the db. Use Timezone.cfc to cast to/from UTC. http://timezonecfc.riaforge.org/ Judah On Tue, Aug 24, 2010 at 12:28 PM, Vivec wrote: > > How do you deal with different time zones? > > The server that the application is hosted at is about two hours behind > Trinidad

RE: Time zones in CF Applications

2010-08-24 Thread Jacob
Use UTC time for transactions and storage? -Original Message- From: Vivec [mailto:gel21...@gmail.com] Sent: Tuesday, August 24, 2010 12:28 PM To: cf-community Subject: Time zones in CF Applications How do you deal with different time zones? The server that the application is hosted at