2

As can be seen below, system time and SoapUI's time value is different.

system and soapui time

SoapUI using JRE time and that's why it should be a bug of Java's itself because; also below code gives: Venezuela Time

String tzn = TimeZone.getDefault().getDisplayName();
System.out.println(tzn);

What I've tried and failed:

  • Playing with regedit and changing time zone then get it back to correct.
  • Giving -Duser.timezone="Europe/Istanbul" at Control Panel/Java/JRE Settings/Runtime Parameters or giving same parameter inside the JAVA_OPTS variable.
  • Changing time or time zone and get it back.

I checked this question surely, correcting the timezone programmatically is doable but I need to correct SoapUI's timezone which affects automated test results. Because tests are time dependent.

14
  • 3
    So you see the problem when you're just running a test Java program completely independently of SoapUI? If that's the case, I don't see how SoapUI is relevant to the question. Commented Feb 15, 2013 at 14:34
  • Nope not only Java, I am running Soap requests, Http requests, Groovy codes as well. Also some situations requires to trace SoapUI logs. Commented Feb 15, 2013 at 14:40
  • Are you sure that Europe/Turkey is a defined timezone? Could you try setting it with Europe/Istanbul? According to this article tutorials.jenkov.com/java-date-time/java-util-timezone.html Europe/Turkey is not defined. Commented Feb 15, 2013 at 15:24
  • @ÖmerFarukAlmalı Could you please clarify your answer to the above question? Let me re-state it: On this same system, if you put your 2 lines of java code above (the ones that print the default timezone) into a stand-alone program, does the program output Venezuelan Time or Turkish time? Commented Feb 15, 2013 at 15:28
  • @bhdrkn I tried Europe/Istanbul. I typed it wrong in the question it's not working. Commented Feb 15, 2013 at 15:32

1 Answer 1

2

I really tried hard to solve this issue, for days. I really don't know why the most plausible two methods are not working properly which:

  • Creating JAVA_OPTS system variable which has the value of: -Duser.timezone="Turkey"
  • Passing vm parameter from command line.

At last I gave up and set this parameter for each specific program, to be able to do this for SoapUI, go to SoapUI Home Path/bin folder and right click to soapui-pro.bat and choose to edit. (If you are using the community version, the name of the bat file will be different)

Then go to line 29 which starts with set JAVA_OPTS=-Xms128m... and insert time-zone parameter: -Duser.timezone="Turkey". Now execute the bat file, it's going to start to work properly!

Sign up to request clarification or add additional context in comments.

1 Comment

This isn't a problem just with SoapUI but with JRE/JVM (6 in my case). Our app was having the same issue with Turkey's timezone. Your solution worked for me!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.