Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Zach_Stone #1
Timezone / now() function
I looked for an answer to this problem for days !!!
We have a shared hosting server that is in Australia that contains
applications used by Australian users, however some of the applications are
specific to Hong Knog (accessed by Hong Kong users from Hong Knog) The problem
is that the application uses now() function which gets the date/time in
Australia (where the server is) . How can we make this one application use the
Hong Kong timezone but keep all other applications on the same server use
Australian Timezone ?
We basically eed to control the value of Now() at application level and not at
server level. Is this possible ?
Thanks
Zach_Stone Guest
-
support for timezone / DST
I'm new to Flex, have a simple question that I haven't been able to find the answer for: Given a future date and timezone indicator (e.g. "May... -
Timezone update package
Is there an updated timezone information package available for Ubuntu 5.10 "Breezy Badger"? I'm personally interested in updates for Australian... -
Converting the time from one timezone to another
I asked a question about a week ago about how to get my local time, since my application is running on a server halfway around the world. I have... -
timezone in javascript
Hi! I have a javascript serverside script that stores the "Date" command in a database. The problem is that I am in Norway, ans the server is in... -
Timezone with MSSQL/IIS/ASP
My WEB-server/MSSQL-server is in a different timezone (GMT -05:00). I need to publish records restricted to "today" according to my timezone (GMT +... -
PaulH #2
Re: Timezone / now() function
switch from now() to a var that contains the hong kong tz datetime which you can cast from the server's tz. maybe [url]http://www.sustainablegis.com/projects/tz/testTZCFC.cfm[/url] might help.
PaulH Guest
-
Zach_Stone #3
Re: Timezone / now() function
Thanks for your reply Paul,
If I do this will I still be able to use the now() variable ?
We've got thousands of lines of code that are using now() so would be great if
we can keep the var now() the same and just change its value to the new
timezone !
Zach_Stone Guest
-
PaulH #4
Re: Timezone / now() function
sorry no. the now() function returns the datetime from the cf server. you'll
need to set the hong kong now say in the application.cfm (or application.cfc)
and use that in place of the now() function. it should be simple enough to do
a search and replace.
it would probably be a good idea to review all your apps for this kind of
problem going forward. for example, how are you handling australia's 3 tz? we
normally use UTC (GMT) for all datetimes and cast to the user's tz as required
(that's where the timeZone.cfc came from in the first place).
PaulH Guest



Reply With Quote

