Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
bj #1
Outputting current time
I output the current day/date on our web site home page. We recentlt moved
to an american server that is 10 hours behing us in Australia. Whats the
easiest way to add 10 hours to this date function to display the correct
Australian date.
<cfoutput>#DateFormat(Now(),
"DDDD MMMM D ")# </cfoutput>
bj Guest
-
Saving current date and time in ASP and ACCESS
Hi all, Im developing a simple web page and Im new to ASP. I want to save the current date and time in my MS ACCESS table I have a field in... -
Current Time
I need to show a current time in this mode ( 29.3 secondes ) how i do ?? I use this for show current time in this mode ( 29340 ) i don't know... -
Current time in a procedure ??!!
Hi, i want to put a lot of trace (log time in a table) in some procedure. The function "current" show the same time by statement. How can i get... -
How to change the current thread current culture at run time.
I have created a new culture : Dim objCulture As New CultureInfo("he") //hebrew When I tried to assign it to the current thread. ... -
Current Date & Time
I want to display the current date & time on my web site. Not being a code guru could someone please tell me what is the simplest script that works... -
PaulH #2
Re: Outputting current time
the simplest way is to simply dateAdd("h",10,now()) BUT that doesn't take into account daylight savings, etc. you might have a look at [url]http://www.sustainablegis.com/projects/tz/testTZCFC.cfm[/url].
PaulH Guest
-
Stressed_Simon #3
Re: Outputting current time
I always use the following function in my Application.cfm
<cfscript>
// allow for time difference
REQUEST.DateTime = DateAdd("h", GetTimeZoneInfo().utcHourOffset, Now());
</cfscript>
Then I reference REQUEST.DateTime instad of Now() throughout the Application.
Gives the difference between the server time and the time in Greenwich London,
so if you add or subtract the relevant number of hours that should sort it!
Stressed_Simon Guest
-
PaulH #4
Re: Outputting current time
i probably spend too much time thinking about timezones and calendars and such
but that's not a good idea, not all tz offsets are in hours. historically
there have been pretty "interesting" tz (for instance Asia/Riyadh87 &
Mideast/Riyadh89 have an offste of GMT+03:07) since these are in the hands of
politicians. so you need to be careful about this sort of thing. further,
you're not taking into account DST which isn't even uniform within some
countries let alone across them.
PaulH Guest
-
bj #5
Re: Outputting current time
Thanks for the responses guys. Knew someone else would have the same issue.
"PaulH" <paul@sustainablegis.com> wrote in message
news:d456bq$6l7$1@forums.macromedia.com...such> i probably spend too much time thinking about timezones and calendars andof> but that's not a good idea, not all tz offsets are in hours. historically
> there have been pretty "interesting" tz (for instance Asia/Riyadh87 &
> Mideast/Riyadh89 have an offste of GMT+03:07) since these are in the hands> politicians. so you need to be careful about this sort of thing. further,
> you're not taking into account DST which isn't even uniform within some
> countries let alone across them.
>
bj Guest



Reply With Quote

