System Clock in LC Process

10 views
Skip to first unread message

Sayoni

unread,
Jul 1, 2009, 4:49:16 AM7/1/09
to Adobe LiveCycle Developers
Hi,

I want to generate a system date in an LC Process. Can anyone tell how
to do it. Whether it can be done by scripting or any service that
needs to be used.

Thanks,
Sayoni.

Duane Nickull

unread,
Jul 1, 2009, 10:58:26 AM7/1/09
to live...@googlegroups.com
You can write your own component in Java and use the java.utils class.

D

hemen.kapadia

unread,
Jul 1, 2009, 1:30:35 PM7/1/09
to Adobe LiveCycle Developers
A quick way to get the system date is as follows

format-date(current-dateTime(), "en", "US", "WIN", "US/Pacific-New")

This format above is for the USA pacific time, so you need to change
the Timezone value depending on where your LC server is hosted.

for some reason current-dateTime always returns time for GMT. so we
can use format-date to convert it to our timezone..

Helpful docs :
http://livedocs.adobe.com/livecycle/es/wb_help/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00001034.html
http://livedocs.adobe.com/livecycle/es/wb_help/00001108.html#1501738


-Hemen

Duane Nickull

unread,
Jul 3, 2009, 10:58:44 AM7/3/09
to Adobe LiveCycle Developers
I also have a flex date manipulation class that can find the localized time and count down backwards if anyone wants the source code.

When using data arrays, be careful to determine if your programming language uses 0 as the first array member.  Some will do this for days of a month but use 1 for the first day of a week.

Duane

--
Sr. Technical Evangelist / Adobe / LiveCycle ES
Chair – OASIS SOA RM Technical Committee
Blog: http://technoracle.blogspot.com
Twitter: duanechaos
Duane’s World TV: http://www.duanesworldtv.org
Band: http://www.myspace.com/22ndcentury
Co-author – Web 2.0 Architectures, O’Reilly Media, ISBN 13: 9780596514433
Reply all
Reply to author
Forward
0 new messages