Sorry, forgot to mention I changed the test time to 17:59:59 for my
time zone so I could see the 24 issue.

On Tue, Apr 5, 2011 at 9:21 PM, Matthew Woodward <[email protected]> wrote:
> This should do it--obviously if you use this a lot you'd want to turn
> it into a function so you can reuse it wherever you need it (let me
> know if you need help with that).
>
> <cfscript>
>  sdf = CreateObject("java",
> "java.text.SimpleDateFormat").init("yyyy-MMM-dd HH:mm:ss");
>  sdf.setTimeZone(CreateObject("java",
> "java.util.TimeZone").getTimeZone("GMT"));
>  sdfLocal = CreateObject("java",
> "java.text.SimpleDateFormat").init("yyyy-MMM-dd HH:mm:ss");
>  WriteOutput(sdfLocal.parse(sdf.format("2011-04-05 17:59:59")));
> </cfscript>
>
> The WriteOutput at the end is just so you can see the result. The meat
> of it is sdfLocal.parse(sdf.format(YOUR_DATE_STRING_HERE)) which you
> can set to a variable if you need to:
> myUTCDate = sdfLocal.parse(sdf.format("2011-04-05 17:59:59"));
>
> Let me know if you need further help on this, and thanks for bringing
> the bug to our attention. I suspect it'll be a quick fix once we get a
> chance to look at the code since on the face of it it just seems like
> a one-off/wrapping type error.
> --
> Matthew Woodward
> [email protected]
> http://blog.mattwoodward.com
> identi.ca / Twitter: @mpwoodward
>
> Please do not send me proprietary file formats such as Word,
> PowerPoint, etc. as attachments.
> http://www.gnu.org/philosophy/no-word-attachments.html
>



-- 
Matthew Woodward
[email protected]
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word,
PowerPoint, etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html

-- 
official tag/function reference: http://openbd.org/manual/
 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to