<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Convert date/time from UTC to Local time based on country code or Time Zone in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329743#M98902</link>
    <description>&lt;P&gt;Bonjour,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code do not work for Morroco ... you may know that in 2018 that have decided last minute, not to change time summer/winter ... else (for other countries), it works well.&lt;/P&gt;
&lt;P&gt;regards&lt;/P&gt;
&lt;P&gt;Damien&lt;/P&gt;</description>
    <pubDate>Mon, 27 May 2019 07:55:19 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-27T07:55:19Z</dc:date>
    <item>
      <title>Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329736#M98895</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have flights departure time that are stored in Oracle Database in UTC date &amp;amp; time.&lt;/P&gt;&lt;P&gt;I have a table with airport code, associated country and associated time zone.&lt;/P&gt;&lt;P&gt;Do you know a solution to convert date and time from UTC to Local based on available information ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can read on the community that some manage similar issue having the time difference between local &amp;amp; UTC ... I do not have such information ...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Difference between UTC time and Local time is influenced by TimeZone, but also by time change Summer/Winter in some countries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All ideas are welcome.&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:45:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329736#M98895</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T05:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329737#M98896</link>
      <description>&lt;P&gt;Hi Damien,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;You need to create a routine like this one for this purpose:&lt;/P&gt; 
&lt;PRE&gt;package routines;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.TimeZone;

public class dateConversion {

	 public static String convertTzToTz(String strDate, String inTz, String outTz) throws Exception
	    {
			if (strDate == null || inTz == null || outTz == null)
					return null;
			 
			// Convert strDate from any valid timezone such Europe/Paris to another one
			// strDate is expected to be formatted as "yyyy-MM-ddTHH:mm:ssZ"
			 
			SimpleDateFormat indfm = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
			indfm.setTimeZone(TimeZone.getTimeZone(inTz));
			Date inDate = indfm.parse(strDate);
	
			SimpleDateFormat outdfm = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
			outdfm.setTimeZone(TimeZone.getTimeZone(outTz));
	
			return outdfm.format(inDate);
	    }
}&lt;/PRE&gt; 
&lt;P&gt;Then in your job you can use the following expression to convert from GMT to Paris TZ:&lt;/P&gt; 
&lt;PRE&gt;dateConversion.convertToGmt(out1.CreatedDate, "GMT", "Europe/Paris")&lt;/PRE&gt; 
&lt;P&gt;Of course, timezone can be expressed depending on your own data (row1.inTimezone, row1.outTimezone).&lt;/P&gt; 
&lt;P&gt;If you need more detail, contact me by PM (french speaking if you prefer).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 May 2019 09:53:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329737#M98896</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-05-23T09:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329738#M98897</link>
      <description>&lt;P&gt;Hello TRF,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you for your answer.&lt;/P&gt;
&lt;P&gt;I will try it ... but I am a beginner ... java code in talend job ... new for me.&lt;/P&gt;
&lt;P&gt;just a question concerning the piece of code you are sharing with me.&lt;/P&gt;
&lt;P&gt;On top we declare&lt;/P&gt;
&lt;PRE&gt;convertTzToTz&lt;/PRE&gt;
&lt;P&gt;and then you ask me to use&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;convertToGmt&lt;/PRE&gt;
&lt;P&gt;a typo ?&lt;/P&gt;
&lt;P&gt;then, my objective is not only to convert from GMT to Local, knowing that in some places in the world (like France where I am), we have winter/summer time. Is this piece of code taking it into account ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I come back to you when I succeed to implement it.&lt;/P&gt;
&lt;P&gt;Thanks again for you answer.&lt;/P&gt;
&lt;P&gt;Damien&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 13:28:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329738#M98897</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-25T13:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329739#M98898</link>
      <description>&lt;P&gt;hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried but something is wrong with the date ... date format ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;you mentionned that you expect specific date format in input ... yyyy-mm-ddThh:mm:ssZ ? what are T &amp;amp; Z ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Démarrage du job Test_Home_UTC_Local a 15:07 25/05/2019.&lt;BR /&gt;[statistics] connecting to socket on port 3415&lt;BR /&gt;[statistics] connected&lt;BR /&gt;Exception in component tMap_1 (Test_Home_UTC_Local)&lt;BR /&gt;java.text.ParseException: Unparseable date: "2019-05-01 05:55:00"&lt;BR /&gt;at java.text.DateFormat.parse(Unknown Source)&lt;BR /&gt;at routines.dateConversion.convertTzToTz(dateConversion.java:19)&lt;BR /&gt;at servair_rim.test_home_utc_local_0_1.Test_Home_UTC_Local.tFileInputExcel_1Process(Test_Home_UTC_Local.java:1594)&lt;BR /&gt;at servair_rim.test_home_utc_local_0_1.Test_Home_UTC_Local.tWarn_1Process(Test_Home_UTC_Local.java:463)&lt;BR /&gt;at servair_rim.test_home_utc_local_0_1.Test_Home_UTC_Local.runJobInTOS(Test_Home_UTC_Local.java:2195)&lt;BR /&gt;at servair_rim.test_home_utc_local_0_1.Test_Home_UTC_Local.main(Test_Home_UTC_Local.java:2044)&lt;BR /&gt;[statistics] disconnected&lt;/P&gt;&lt;P&gt;Job Test_Home_UTC_Local terminé à 15:07 25/05/2019. [Code sortie=1]&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 14:12:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329739#M98898</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-25T14:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329740#M98899</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;On my side I have 2 different methods, one for conversion from any TZ to GMT (&lt;SPAN&gt;convertToGmt) and another to convert from any TZ to any TZ (convertTzToTz). As the 2nd one is more general, I've give you just this one. Of course it takes care of&amp;nbsp;daylight saving time (summer/winter time) for any place in the world.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regarding the exception you encounter, be carefull to the expected inout date format which should be "yyyy-MM-dd&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;T&lt;/FONT&gt;&lt;/STRONG&gt;HH:mm:ss".&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 14:38:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329740#M98899</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-05-25T14:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329741#M98900</link>
      <description>&lt;P&gt;Thank you TRF.&lt;/P&gt;
&lt;P&gt;it seems to work ! 2 hours ago I never played with java code in talend ...&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As I convert airport time departure and arrival from UTC to local, I use the timezone as a parameter.&lt;/P&gt;
&lt;P&gt;It's perfect ... I continue my testing.&lt;/P&gt;
&lt;P&gt;Have a good week end.&lt;/P&gt;
&lt;P&gt;Damien&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 14:47:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329741#M98900</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-25T14:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329742#M98901</link>
      <description>&lt;P&gt;Great!&lt;/P&gt;
&lt;P&gt;Don't hesitate if you need more help or a contact as an integrator to help you on your projects.&lt;/P&gt;</description>
      <pubDate>Sat, 25 May 2019 15:16:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329742#M98901</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-05-25T15:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329743#M98902</link>
      <description>&lt;P&gt;Bonjour,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code do not work for Morroco ... you may know that in 2018 that have decided last minute, not to change time summer/winter ... else (for other countries), it works well.&lt;/P&gt;
&lt;P&gt;regards&lt;/P&gt;
&lt;P&gt;Damien&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 07:55:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329743#M98902</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-27T07:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329744#M98903</link>
      <description>&lt;P&gt;The code use the&amp;nbsp;TimeZone.getTimeZone method which depends of the JRE version which doesn't always take care of &lt;SPAN&gt;the latest time zone data&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;It seems this is a well known problem as explained here&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/27925035/wrong-offset-for-timezone-casablanca-java" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/27925035/wrong-offset-for-timezone-casablanca-java&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2019 11:04:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329744#M98903</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-05-27T11:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329745#M98904</link>
      <description>&lt;P&gt;HI I am also facing same issues could you please help&amp;nbsp; me in this , if i am adding the format as "yyyy-MM-dd HH:mm:ss" then i can able&amp;nbsp; to view data but if i am changing the format as&amp;nbsp;&lt;SPAN&gt;yyyy-mm-ddThh:mm:ss i am not able to succed .here attaching the screen shot for your reference&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error-routine.PNG" style="width: 842px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5cm.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155719i1B942B71E4F0478D/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5cm.png" alt="0683p000009M5cm.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="routine_design.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5Nw.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155087iD1AA6E372FBB1FEC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5Nw.png" alt="0683p000009M5Nw.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="source_sample_data.PNG" style="width: 406px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M5wn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151480iDE1C72EEE6DB4177/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M5wn.png" alt="0683p000009M5wn.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:39:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329745#M98904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-18T17:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329746#M98905</link>
      <description>&lt;P&gt;HI I am trying to implement your idea but got below error while modify the pattern from source ,could you please help me in this&amp;nbsp;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error-routine.PNG" style="width: 842px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M60o.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/150862i7C26FFB2F2B38117/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M60o.png" alt="0683p000009M60o.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="routine_design.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M60t.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/141685i4643D1ECC1050517/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M60t.png" alt="0683p000009M60t.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="source_sample_data.PNG" style="width: 406px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M60y.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157457i564AA18467C44B07/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M60y.png" alt="0683p000009M60y.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:44:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329746#M98905</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-06-18T17:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Convert date/time from UTC to Local time based on country code or Time Zone</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329747#M98906</link>
      <description>&lt;P&gt;2 things to be checked:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;input date is expected to be formatted as "yyyy-MM-ddTHH:mm:ssZ"&lt;/LI&gt; 
 &lt;LI&gt;timezone must be a valid one (from a Java point of view) such as&amp;nbsp;&amp;nbsp;&lt;A href="https://garygregory.wordpress.com/2013/06/18/what-are-the-java-timezone-ids/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://garygregory.wordpress.com/2013/06/18/what-are-the-java-timezone-ids/&lt;/A&gt;&lt;/LI&gt; 
&lt;/OL&gt;</description>
      <pubDate>Tue, 18 Jun 2019 18:54:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-date-time-from-UTC-to-Local-time-based-on-country-code/m-p/2329747#M98906</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-06-18T18:54:59Z</dc:date>
    </item>
  </channel>
</rss>

