<?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: Week number issue when executing under a Linux Server in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230880#M21376</link>
    <description>Hi&lt;BR /&gt;change the code like &lt;BR /&gt;&lt;B&gt;java.util.Calendar c=new java.util.GregorianCalendar().getInstance();&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;hope it will help you</description>
    <pubDate>Tue, 08 Mar 2011 10:06:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2011-03-08T10:06:20Z</dc:date>
    <item>
      <title>Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230870#M21366</link>
      <description>Hi, 
&lt;BR /&gt;I created a job in Talend under windows that works well if I execute it in my PC. When I export it under the Linux Server of my company, I have an issur with the week number. 
&lt;BR /&gt;The job is the get a csv file on a server and to put it on a mysql database. 
&lt;BR /&gt;The name of the csv file is weekly_counters_ + week number (actually, the last week number) 
&lt;BR /&gt;The tftpGet component have this mask file : 
&lt;BR /&gt;"weekly_counters_" +TalendDate.formatDate("yyyyww",TalendDate.addDate(TalendDate.getCurrentDate(),-1,"dd")) + ".csv" 
&lt;BR /&gt;The job should be execute each monday on the past week data. 
&lt;BR /&gt;For example if we are in week 10 on the 2011-03-07, the file name on the server is "weekly_counters_201109.csv". 
&lt;BR /&gt;So, if it starts from my pc, it works well and on the linux server if have the following error message : 
&lt;BR /&gt;java.io.FileNotFoundExeption : c:/weekly_counters_201110.csv 
&lt;BR /&gt;I guess it is an issue on the Linux java environnement configuration but I wanted to know if I can do something on the Talend part to force java to use the right Calendar? If it is not possible what should I do the the java of the server? 
&lt;BR /&gt;Thank you very much for any help. 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Patrick V</description>
      <pubDate>Sat, 16 Nov 2024 13:03:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230870#M21366</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230871#M21367</link>
      <description>Hi
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;For example if we are in week 10 on the 2011-03-07, the file name on the server is "weekly_counters_201109.csv".&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;We are in week 11 on the 2011-03-07.
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;"java.io.FileNotFoundExeption : c:/weekly_counters_201110.csv&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;1. Please check the local time setting in Linux server.
&lt;BR /&gt;2. Do you run the job in PC and Linux server at the same time?
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 07 Mar 2011 12:34:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230871#M21367</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-07T12:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230872#M21368</link>
      <description>Hi,
&lt;BR /&gt;Thanks for your answer and time.
&lt;BR /&gt;Actually, we are in week 10. Check here : 
&lt;A href="http://www.calendar-365.com/week-number.html" rel="nofollow noopener noreferrer"&gt;http://www.calendar-365.com/week-number.html&lt;/A&gt;
&lt;BR /&gt;1. The Linux server is good and if i make the command "date +%W" today, I have 10 as an answer and if if make date --date '1 day ago' +%%W (that means yesterday) if have 09 as a result. So I conclude that the problem is in the java part...???
&lt;BR /&gt;2. I am running the job on th PC and on the Server the same time.
&lt;BR /&gt;Thank you.
&lt;BR /&gt;Regards,
&lt;BR /&gt;Patrick VALLET</description>
      <pubDate>Mon, 07 Mar 2011 12:52:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230872#M21368</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-07T12:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230873#M21369</link>
      <description>Hi&lt;BR /&gt;Try to use Calendar instead of TalendDate.formatDate("yyyyww", date), add a tJava at the beginning of job and hard code the following code:&lt;BR /&gt;&lt;PRE&gt;java.util.Calendar c=java.util.Calendar.getInstance();&lt;BR /&gt;c.setTime(TalendDate.addDate(TalendDate.getCurrentDate(),-1,"dd"));&lt;BR /&gt;int week =c.get(java.util.Calendar.WEEK_OF_YEAR);&lt;BR /&gt;globalMap.put("week", week);&lt;/PRE&gt;&lt;BR /&gt;Set the file name as:&lt;BR /&gt;"weekly_counters_" +(Integer)globalMap.get("week") + ".csv"</description>
      <pubDate>Mon, 07 Mar 2011 13:23:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230873#M21369</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-07T13:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230874#M21370</link>
      <description>Thank you for this idea. 
&lt;BR /&gt;I am trying it but as I am a beginner in java I have a little problem to put the week of the year in 2 digits as the file name is like "yyyyww.csv", so for week number less than 10, I need to add a zeron before. Can we do it with a Format function or do i have to use a "If...then...else" form?
&lt;BR /&gt;Regards</description>
      <pubDate>Mon, 07 Mar 2011 15:32:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230874#M21370</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-07T15:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230875#M21371</link>
      <description>Hi,
&lt;BR /&gt;Finally, I tried the "if then else" structure but the result is the same. Works fine on my PC and don't give me the right week number on the server.
&lt;BR /&gt;java.util.Calendar c=java.util.Calendar.getInstance();
&lt;BR /&gt;c.setTime(TalendDate.addDate(TalendDate.getCurrentDate(),-1,"dd"));
&lt;BR /&gt;int week =c.get(java.util.Calendar.WEEK_OF_YEAR);
&lt;BR /&gt;int year=c.get(java.util.Calendar.YEAR);
&lt;BR /&gt;String num="";
&lt;BR /&gt;if (week&amp;lt;10)
&lt;BR /&gt;{num="0";}
&lt;BR /&gt;globalMap.put("week", week);
&lt;BR /&gt;globalMap.put("num", num);
&lt;BR /&gt;globalMap.put("year", year);
&lt;BR /&gt;I am still looking for a good solution.
&lt;BR /&gt;Thank you.
&lt;BR /&gt;Patrick V</description>
      <pubDate>Mon, 07 Mar 2011 16:32:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230875#M21371</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-07T16:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230876#M21372</link>
      <description>Hi
&lt;BR /&gt;try
&lt;BR /&gt;
&lt;PRE&gt;java.util.Calendar c=java.util.Calendar.getInstance();&lt;BR /&gt;c.setTime(TalendDate.addDate(TalendDate.getCurrentDate(),-1,"dd"));&lt;BR /&gt;int week =c.get(java.util.Calendar.WEEK_OF_YEAR);&lt;BR /&gt;int year=c.get(java.util.Calendar.YEAR);&lt;BR /&gt;String num="";&lt;BR /&gt;if (week&amp;lt;10){&lt;BR /&gt;globalMap.put("week", "0"+week);&lt;BR /&gt;}else{&lt;BR /&gt;globalMap.put("week", String.valueOf(week));&lt;BR /&gt;}&lt;BR /&gt;globalMap.put("num", num);&lt;BR /&gt;globalMap.put("year", year);&lt;/PRE&gt;
&lt;BR /&gt;Set the file name as:
&lt;BR /&gt;"weekly_counters_" +(String)globalMap.get("week") + ".csv"
&lt;BR /&gt;Best regards
&lt;BR /&gt;Shong</description>
      <pubDate>Tue, 08 Mar 2011 03:23:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230876#M21372</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T03:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230877#M21373</link>
      <description>Hi shong, 
&lt;BR /&gt;I did approximetely the same thing and as I said the issue is still the same. Works well on my Pc and does not work on the server. 
&lt;BR /&gt;On the server the 6 March 2011(sunday) is the beginning of the Week 11 and on my PC, the same date is consider as the last day of the week 9. 
&lt;BR /&gt;If there is not workaround I should maybe ask to the management to update the JVM on the server and make sure that ISO 8601 is setted at the installation? 
&lt;BR /&gt;Thank you. 
&lt;BR /&gt;Regards, 
&lt;BR /&gt;Patrick V</description>
      <pubDate>Tue, 08 Mar 2011 09:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230877#M21373</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T09:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230878#M21374</link>
      <description>hi 
&lt;BR /&gt;Can you excecute a small java program in your Linux server to get week and check is it same as in talend.</description>
      <pubDate>Tue, 08 Mar 2011 09:36:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230878#M21374</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T09:36:19Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230879#M21375</link>
      <description>Thank for your time. I did the test and the week is not the same when I run a programm under the java of the server. 
&lt;BR /&gt; "Java server the 6 March 2011(sunday) is the beginning of the Week 11 / Java on my PC, the same date is consider as the last day of the week 9." 
&lt;BR /&gt;I don' know what I need to do to change local variable of the java server 
&lt;IMG id="smileysad" class="emoticon emoticon-smileysad" src="https://yutwg22796.i.lithium.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;. 
&lt;BR /&gt;regards, 
&lt;BR /&gt;Patrick V</description>
      <pubDate>Tue, 08 Mar 2011 09:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230879#M21375</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T09:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230880#M21376</link>
      <description>Hi&lt;BR /&gt;change the code like &lt;BR /&gt;&lt;B&gt;java.util.Calendar c=new java.util.GregorianCalendar().getInstance();&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;hope it will help you</description>
      <pubDate>Tue, 08 Mar 2011 10:06:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230880#M21376</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T10:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230881#M21377</link>
      <description>Thanks. Unfortunately the result is the same on the server instead I specify the calendar is a gregorian one.&lt;BR /&gt;Very weird.&lt;BR /&gt;I let you know if I found out what was wrong.&lt;BR /&gt;Regards&lt;BR /&gt;PV</description>
      <pubDate>Tue, 08 Mar 2011 12:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230881#M21377</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-08T12:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Week number issue when executing under a Linux Server</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230882#M21378</link>
      <description>Yes, thanks. On the Linux server, il I put "date +W%", I have the good week number. It is in the java that the week number is wrong 
&lt;IMG id="smileysad" class="emoticon emoticon-smileysad" src="https://yutwg22796.i.lithium.com/i/smilies/16x16_smiley-sad.png" alt="Smiley Sad" title="Smiley Sad" /&gt;. 
&lt;BR /&gt;Regards 
&lt;BR /&gt;Patrick V</description>
      <pubDate>Wed, 09 Mar 2011 09:38:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Week-number-issue-when-executing-under-a-Linux-Server/m-p/2230882#M21378</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-03-09T09:38:01Z</dc:date>
    </item>
  </channel>
</rss>

