![]() |
| Time Zone Offset For Current Time Display Using CF |
|
scottmac
|
I'm using this: #LSTimeFormat(Now(),"h:mm tt")#
To display the current local time on a website. I can't find any reference anywhere to setting an offset for the time zone for the display. The HMS server is (obviously) on Eastern Time My local site is on Mountain Time -- not practical to set the server time to MST because I have other sites which need to display current time in their local time zone. Surely there must be a simple timezone offset to set time on a site by site basis? Any help would be appreciated - I'm not a full-time CF coder so my skills are limited currently. |
||||||||||||
|
|
|||||||||||||
|
bobclingan
Forum Regular
|
You can include the a specific time zone to get the result you want ie:
Where zzz is your time zone like PST, MST, etc.... |
||||||||||||||
|
|
|||||||||||||||
| Strange display when specifying time zone |
|
scottmac
|
Thanks for the reply -
I added the time zone spec in this form: #LSTimeFormat(Now(),"h:mm MST")# This is what I have displayed on the page at 5:40pm MST: "12:40 35A" It's consistently a 7 hour offset. I've confirmed that the date/time setting on the server is correct (I'm on a VPS) Weird?? Any ideas?? |
||||||||||||
|
|
|||||||||||||
|
bobclingan
Forum Regular
|
My bad- that was for display purposes not conversion... here is something that should do the trick...
http://www.cflib.org/udf.cfm?ID=373 |
||||||||||||
|
|
|||||||||||||
| Time Zone Offset For Current Time Display Using CF |
|
||
|


