[
https://issues.apache.org/jira/browse/PIG-4115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14171241#comment-14171241
]
Rohini Palaniswamy commented on PIG-4115:
-----------------------------------------
I just had something similar reported yesterday (timezone is UTC though) and
user said it worked with jodatime 2.5.
{code}
java.lang.IllegalArgumentException: Cannot parse "20141012": Illegal instant
due to time zone offset transition (America/Santiago)
at
org.joda.time.format.DateTimeParserBucket.computeMillis(DateTimeParserBucket.java:336)
at
org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:662)
{code}
Can you recompile pig with jodatime version changed to 2.5 in
ivy/libraries.properties and check if that works for you? jodatime is bundled
into pig-withouthadoop.jar in pig versions before 0.14.
> Timezone inconsistency in Pig Oozie action fails with
> "(org.apache.pig.builtin.ToDate2ARGS)[datetime]"
> ------------------------------------------------------------------------------------------------------
>
> Key: PIG-4115
> URL: https://issues.apache.org/jira/browse/PIG-4115
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.12.0
> Reporter: Michalis Kongtongk
> Assignee: Rohini Palaniswamy
>
> Running a Pig Action in Oozie :
> CentOS
> - mv /etc/localtime /etc/localtime.mv #backup your current tz
> - ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime # set tz to
> Europe/Zurich
> - create a hdfs://tmp/file.txt in hdfs with content "1"
> In Pig do:
> A = load '/tmp/file.txt' as (a:chararray);
> B = foreach A generate *, ToDate('02/11/1940', 'dd/MM/yyyy') ;
> dump B;
> In Oozie Pig Action,
> produce the same script in in workflow.xml and execute
> this is where it'll fail.
> {code}
> ...
> ERROR 0: Exception while executing [POUserFunc (Name:
> POUserFunc(org.apache.pig.builtin.ToDate2ARGS)[datetime] - scope-254 Operator
> Key: scope-254) children: null at []]:
> java.lang.IllegalArgumentException: Cannot parse "02/11/1940": Illegal
> instant due to time zone offset transition (Europe/Zurich)
> ...
> {code}
> Since Oozie is using Pig as a library, I believe they should behave the same.
> We notice this inconsistency, when the OS is set to
> $ date +%Z # timezone name
> CEST
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)