Skip to main content
Dileep_NR
Inspiring
March 16, 2009
Question

PST to UTC

  • March 16, 2009
  • 6 replies
  • 1924 views
Hi All,

How can i convert a date in PST to its equivalent UTC?

Please help
This topic has been closed for replies.

6 replies

Inspiring
March 16, 2009
Azadi wrote:
> i know! i am almost dreading the moment i have to make a fully tz-aware
> app... hope being on my own vps will be of help?

yeah the cheapest solution is UTC tz on the server & cast to user tz. next best
is dumping datetimes & use epoch offsets. best of all is that cf gets a set tz
method :-)
Inspiring
March 16, 2009
i know! i am almost dreading the moment i have to make a fully tz-aware
app... hope being on my own vps will be of help?

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Inspiring
March 16, 2009
Azadi wrote:
> i kinda figured since the OP is so sure the original time is in PST,
> that must be the server tz...

using a hosted cf server for an app that has to handle different tz will quickly
get you out of that mind set (or drive you nuts ;-)
Inspiring
March 16, 2009
i kinda figured since the OP is so sure the original time is in PST,
that must be the server tz...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/
Inspiring
March 16, 2009
Azadi wrote:
> doesn't DateConvert() cf function work for you?
> details are in CFML Reference - download from adobe.com if you do not
> have one.

unless the server's in PST tz no, it won't convert correctly. cf sees all
datetimes as being in the server tz so when you have datetimes on the DST
boundary, those datetimes will never exist, ie when PST becomes PDT (again
depending on the server tz).

for tz casting have a look at:

http://www.sustainablegis.com/projects/tz/testTZCFC.cfm

and maybe read some of these for some of the joys of working w/tz:

http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=cat&catid=162AEDB4-20ED-7DEE-2A6CF1B79AC2E03A
Dileep_NR
Dileep_NRAuthor
Inspiring
March 16, 2009
I am getting a date in the following format from a web service "23:19:50 Mar 15, 2008 PDT". I would like to convert this date to UTC format
Inspiring
March 16, 2009
doesn't DateConvert() cf function work for you?
details are in CFML Reference - download from adobe.com if you do not
have one.

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/