Not sure it was already answered.

Did you try with coord:formatTime(dateStr, formatString).
date=coord:nominalTime()
and formatString=Some date format with TZ spec following java data format.

I never tried it. But it should work.

Regards,
Mohammad


________________________________
 From: Eduardo Afonso Ferreira <[email protected]>
To: Oozie User <[email protected]> 
Sent: Monday, November 12, 2012 1:07 PM
Subject: Convert date/time in coordinator.
 
Hi there,

How can one convert date/time in a coordinator from UTC to local timezone?
For example, ${coord:nominalTime()} is the time the instance is scheduled to 
start in UTC.
Say I want to convert that to my local timezone, i.e. "America/New_York" and 
have it assigned to a property:

...........
<property>

</property>
  <name>NOMINAL_TIME_UTC</name>
  <value>${coord:nominalTime()}</value>
<property>
  <name>NOMINAL_TIME_NY</name>
  <value>${how-do-i-convert-utc-to-local}</value>
</property>

...........

So, if nominal time (UTC) is "2012-11-12T15:00Z", is there any function or 
whatever that I can use in place of "how-do-i-convert-utc-to-local" that will 
give me back "2012-11-12T10:00" for the value of NOMINAL_TIME_NY?

Thanks in advance.
Eduardo.

Reply via email to