Customer Portal

Time Zone always ignored

Comments 3

  • Avatar
    Vladimir Barton
    0
    Comment actions Permalink
    Hi Dflkid,
    it appears that your date2str() function definition is missing the locale parameter which makes the timeZone parameter ignored. According to our documentation, the date2str() function accept these 3 definition formats:

    • string date2str(date input, string pattern);

    • string date2str(date input, string pattern, string locale);

    • string date2str(date input, string pattern, string locale, string timeZone);

    In other words, using the timeZone parameter requires you to also define the locale. Having said that, I would suggest changing your function definition in the following way in order to achieve the desired result:

    date2str(today(),"yyyy-MM-dd'T'HH:mm:ssZ","en.US","America/Los_Angeles");

    Kind regards,
  • Avatar
    Vladimir Barton
    0
    Comment actions Permalink
    Hi Dflkid,
    additionally, let me back up a little bit here. I would be curious as to where exactly you can see the improper time zone. Is it in the Data Inspector in CloverETL Designer or in an output of the graph? What I covered in my previous update concerns just the transformation string format and would affect the graph output. However, if you are seeing the improper time zone in the Data Inspector upon the graph run it could be caused just by the metadata definition (edit metadata > select your date-type field > Property section > Advanced > Time zone).
    Best regards,
  • Avatar
    dflkid
    0
    Comment actions Permalink
    Thank you, it was my fault. I didn't realize I needed both parameters. Once I used locale and time zone, it worked as expected.

Please sign in to leave a comment.