oozie-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohammad Islam <misla...@yahoo.com>
Subject Re: datetime conversion to a specific timezone
Date Thu, 03 Nov 2011 00:22:09 GMT
Hi Deepak,
In that case, you need to change your format string. 'Z' stands for UTC.

Would mind to check this link to find the correct TZ string?
http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html


I believe it might be 'zzzz'.

Regards,
Mohammad


________________________________
From: Deepak Reddy <dreddy@couponsinc.com>
To: "oozie-users@incubator.apache.org" <oozie-users@incubator.apache.org>; Mohammad
Islam <mislam77@yahoo.com>
Sent: Wednesday, November 2, 2011 2:05 PM
Subject: RE: datetime conversion to a specific timezone

Hi Mohammad,

I tried the following in my coordinator.xml file (the job runs in UTC) 

${coord:formatTime(coord:nominalTime(), 'yyyy-MM-dd HH:mm:ss z')}

It actually returns 2011-11-02 00:30:00 UTC which is not what I am expecting.

If the nominal time is 2011-11-02 00:30:00 UTC then I would like to pass 2011-11-01 17:30:00
PST to my job from the oozie workflow.

Thank you,
DR

-----Original Message-----
From: Mohammad Islam [mailto:mislam77@yahoo.com] 
Sent: Wednesday, November 02, 2011 11:35 AM
To: oozie-users@incubator.apache.org
Subject: Re: datetime conversion to a specific timezone

Deepak,
Can you try this?
http://yahoo.github.com/oozie/releases/3.1.0/CoordinatorFunctionalSpec.html#a6.8.2._coord:formatTimeString_ts_String_format_EL_Function_since_Oozie_2.3.2

Basically use {coord:formatTime(oord:nominalTime(), String format)} . In the 'format' string
specify the new TZ.

I never tested that, but it should work.

Regards,
Mohammad




________________________________
From: Deepak Reddy <dreddy@couponsinc.com>
To: "oozie-users@incubator.apache.org" <oozie-users@incubator.apache.org>
Sent: Wednesday, November 2, 2011 11:02 AM
Subject: datetime conversion to a specific timezone

Is there a way to convert the nominal time from UTC to say PST/PDT within oozie workflow.

Thanks,
DR
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message