Skip to main content
Participating Frequently
February 25, 2010
Question

date formatting?

  • February 25, 2010
  • 2 replies
  • 674 views

How do we show CST OR EST OR GMT at the end after the date

#DateFormat(Now())# at #TimeFormat(Now())#  (here i want to show CST or GMT or whatever it is)

thanks

This topic has been closed for replies.

2 replies

Inspiring
February 25, 2010

it depends entirely on the timezone (tz) your server is located in. as pointed out using the java style "LONG" or "FULL" mask will get you the tz id for the tz that your server is in.

if you want the tz local to the user, that's another matter entierly.

Inspiring
February 25, 2010

Dates don't really have timezones... it's more of a time thing.  So the function you're after is timeFormat()...

http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-6de0.html

--

Adam

Participating Frequently
February 25, 2010

so what does he mean to write based on this

long: medium followed by three-letter time zone; as in, 2:34:55 PM EST

so how do we get that est or cst

Inspiring
February 25, 2010

<cfoutput>#TimeFormat(now(), "long")# </cfoutput>

will produce something like:

1:36:23 AM GMT